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

Unified Diff: base/file_path.h

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/event_recorder.h ('k') | base/file_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_path.h
diff --git a/base/file_path.h b/base/file_path.h
index 81de702531de8a43376186f62be617a68bfe1a3e..e5c4b846f1c37fd61c95c9e7a202aa734df1e75e 100644
--- a/base/file_path.h
+++ b/base/file_path.h
@@ -125,6 +125,8 @@
class Pickle;
class PickleIterator;
+namespace base {
+
// An abstraction to isolate users from the differences between native
// pathnames on different platforms.
class BASE_EXPORT FilePath {
@@ -398,8 +400,13 @@ class BASE_EXPORT FilePath {
StringType path_;
};
+} // namespace base
+
+// TODO(brettw) remove this once callers properly use the base namespace.
+using base::FilePath;
+
// This is required by googletest to print a readable output on test failures.
-BASE_EXPORT extern void PrintTo(const FilePath& path, std::ostream* out);
+BASE_EXPORT extern void PrintTo(const base::FilePath& path, std::ostream* out);
// Macros for string literal initialization of FilePath::CharType[], and for
// using a FilePath::CharType[] in a printf-style format string.
@@ -419,15 +426,15 @@ namespace BASE_HASH_NAMESPACE {
#if defined(COMPILER_GCC)
template<>
-struct hash<FilePath> {
- size_t operator()(const FilePath& f) const {
- return hash<FilePath::StringType>()(f.value());
+struct hash<base::FilePath> {
+ size_t operator()(const base::FilePath& f) const {
+ return hash<base::FilePath::StringType>()(f.value());
}
};
#elif defined(COMPILER_MSVC)
-inline size_t hash_value(const FilePath& f) {
+inline size_t hash_value(const base::FilePath& f) {
return hash_value(f.value());
}
« no previous file with comments | « base/event_recorder.h ('k') | base/file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698