Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: base/file_path.cc

Issue 6317016: Change UTF8ToUTF16 to accept const StringPiece&. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/crypto/rsa_private_key.cc ('k') | base/logging.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « base/crypto/rsa_private_key.cc ('k') | base/logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698