| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #if defined(WEBRTC_WIN) | 11 #if defined(WEBRTC_WIN) |
| 12 #include "webrtc/base/win32.h" | 12 #include "webrtc/base/win32.h" |
| 13 #include <shellapi.h> | 13 #include <shellapi.h> |
| 14 #include <shlobj.h> | 14 #include <shlobj.h> |
| 15 #include <tchar.h> | 15 #include <tchar.h> |
| 16 #endif // WEBRTC_WIN | 16 #endif // WEBRTC_WIN |
| 17 | 17 |
| 18 #include "webrtc/base/common.h" | 18 #include "webrtc/base/checks.h" |
| 19 #include "webrtc/base/fileutils.h" | 19 #include "webrtc/base/fileutils.h" |
| 20 #include "webrtc/base/logging.h" | 20 #include "webrtc/base/logging.h" |
| 21 #include "webrtc/base/pathutils.h" | 21 #include "webrtc/base/pathutils.h" |
| 22 #include "webrtc/base/stringutils.h" | 22 #include "webrtc/base/stringutils.h" |
| 23 #include "webrtc/base/urlencode.h" | 23 #include "webrtc/base/urlencode.h" |
| 24 | 24 |
| 25 namespace rtc { | 25 namespace rtc { |
| 26 | 26 |
| 27 static const char EMPTY_STR[] = ""; | 27 static const char EMPTY_STR[] = ""; |
| 28 | 28 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 Pathname::Pathname(const std::string& folder, const std::string& filename) | 66 Pathname::Pathname(const std::string& folder, const std::string& filename) |
| 67 : folder_delimiter_(DEFAULT_FOLDER_DELIM) { | 67 : folder_delimiter_(DEFAULT_FOLDER_DELIM) { |
| 68 SetPathname(folder, filename); | 68 SetPathname(folder, filename); |
| 69 } | 69 } |
| 70 | 70 |
| 71 Pathname& Pathname::operator=(const Pathname&) = default; | 71 Pathname& Pathname::operator=(const Pathname&) = default; |
| 72 Pathname& Pathname::operator=(Pathname&&) = default; | 72 Pathname& Pathname::operator=(Pathname&&) = default; |
| 73 | 73 |
| 74 void Pathname::SetFolderDelimiter(char delimiter) { | 74 void Pathname::SetFolderDelimiter(char delimiter) { |
| 75 ASSERT(IsFolderDelimiter(delimiter)); | 75 RTC_DCHECK(IsFolderDelimiter(delimiter)); |
| 76 folder_delimiter_ = delimiter; | 76 folder_delimiter_ = delimiter; |
| 77 } | 77 } |
| 78 | 78 |
| 79 void Pathname::Normalize() { | 79 void Pathname::Normalize() { |
| 80 for (size_t i=0; i<folder_.length(); ++i) { | 80 for (size_t i=0; i<folder_.length(); ++i) { |
| 81 if (IsFolderDelimiter(folder_[i])) { | 81 if (IsFolderDelimiter(folder_[i])) { |
| 82 folder_[i] = folder_delimiter_; | 82 folder_[i] = folder_delimiter_; |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 } | 85 } |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // sanity checking | 249 // sanity checking |
| 250 return (isalpha(drive[0]) && | 250 return (isalpha(drive[0]) && |
| 251 drive[1] == ':' && | 251 drive[1] == ':' && |
| 252 drive[2] == '\\'); | 252 drive[2] == '\\'); |
| 253 } | 253 } |
| 254 #endif | 254 #endif |
| 255 | 255 |
| 256 /////////////////////////////////////////////////////////////////////////////// | 256 /////////////////////////////////////////////////////////////////////////////// |
| 257 | 257 |
| 258 } // namespace rtc | 258 } // namespace rtc |
| OLD | NEW |