OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 #include <algorithm> |
| 6 |
5 #include "base/file_path.h" | 7 #include "base/file_path.h" |
6 | 8 |
7 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
8 #include <windows.h> | 10 #include <windows.h> |
9 #elif defined(OS_MACOSX) | 11 #elif defined(OS_MACOSX) |
10 #include <CoreFoundation/CoreFoundation.h> | 12 #include <CoreFoundation/CoreFoundation.h> |
11 #endif | 13 #endif |
12 | 14 |
13 #include "base/logging.h" | 15 #include "base/logging.h" |
14 #include "base/pickle.h" | 16 #include "base/pickle.h" |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1185 | 1187 |
1186 #if defined(FILE_PATH_USES_WIN_SEPARATORS) | 1188 #if defined(FILE_PATH_USES_WIN_SEPARATORS) |
1187 FilePath FilePath::NormalizeWindowsPathSeparators() const { | 1189 FilePath FilePath::NormalizeWindowsPathSeparators() const { |
1188 StringType copy = path_; | 1190 StringType copy = path_; |
1189 for (size_t i = 1; i < arraysize(kSeparators); ++i) { | 1191 for (size_t i = 1; i < arraysize(kSeparators); ++i) { |
1190 std::replace(copy.begin(), copy.end(), kSeparators[i], kSeparators[0]); | 1192 std::replace(copy.begin(), copy.end(), kSeparators[i], kSeparators[0]); |
1191 } | 1193 } |
1192 return FilePath(copy); | 1194 return FilePath(copy); |
1193 } | 1195 } |
1194 #endif | 1196 #endif |
OLD | NEW |