| 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 "base/file_path.h" | 5 #include "base/file_path.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #elif defined(OS_MACOSX) | 9 #elif defined(OS_MACOSX) |
| 10 #include <CoreServices/CoreServices.h> | 10 #include <CoreFoundation/CoreFoundation.h> |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/pickle.h" | 14 #include "base/pickle.h" |
| 15 | 15 |
| 16 // These includes are just for the *Hack functions, and should be removed | 16 // These includes are just for the *Hack functions, and should be removed |
| 17 // when those functions are removed. | 17 // when those functions are removed. |
| 18 #include "base/string_piece.h" | 18 #include "base/string_piece.h" |
| 19 #include "base/string_util.h" | 19 #include "base/string_util.h" |
| 20 #include "base/sys_string_conversions.h" | 20 #include "base/sys_string_conversions.h" |
| (...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1183 | 1183 |
| 1184 #if defined(FILE_PATH_USES_WIN_SEPARATORS) | 1184 #if defined(FILE_PATH_USES_WIN_SEPARATORS) |
| 1185 FilePath FilePath::NormalizeWindowsPathSeparators() const { | 1185 FilePath FilePath::NormalizeWindowsPathSeparators() const { |
| 1186 StringType copy = path_; | 1186 StringType copy = path_; |
| 1187 for (size_t i = 1; i < arraysize(kSeparators); ++i) { | 1187 for (size_t i = 1; i < arraysize(kSeparators); ++i) { |
| 1188 std::replace(copy.begin(), copy.end(), kSeparators[i], kSeparators[0]); | 1188 std::replace(copy.begin(), copy.end(), kSeparators[i], kSeparators[0]); |
| 1189 } | 1189 } |
| 1190 return FilePath(copy); | 1190 return FilePath(copy); |
| 1191 } | 1191 } |
| 1192 #endif | 1192 #endif |
| OLD | NEW |