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

Unified Diff: base/file_path.cc

Issue 113996: Move a few functions commonly called with char* to StringPiece. (Closed)
Patch Set: Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« base/file_path.h ('K') | « base/file_path.h ('k') | base/string_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_path.cc
diff --git a/base/file_path.cc b/base/file_path.cc
index b1bf6873820d28238eb88c44a03749987fc3e364..a00659ed2c78e738cf679e61224a9d0a87b17367 100644
--- a/base/file_path.cc
+++ b/base/file_path.cc
@@ -252,12 +252,12 @@ FilePath FilePath::Append(const FilePath& component) const {
return Append(component.value());
}
-FilePath FilePath::AppendASCII(const std::string& component) const {
+FilePath FilePath::AppendASCII(const StringPiece& component) const {
DCHECK(IsStringASCII(component));
#if defined(OS_WIN)
return Append(ASCIIToWide(component));
#elif defined(OS_POSIX)
- return Append(component);
+ return Append(component.as_string());
#endif
}
« base/file_path.h ('K') | « base/file_path.h ('k') | base/string_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698