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

Unified Diff: base/path_service.h

Issue 1371463003: Move PathService to the base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | base/path_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/path_service.h
diff --git a/base/path_service.h b/base/path_service.h
index 025550f2ad17a95f9b01b13f64b941644bc004eb..c7f1abe71498d149accb774e3f30966853592a2f 100644
--- a/base/path_service.h
+++ b/base/path_service.h
@@ -13,9 +13,9 @@
#include "build/build_config.h"
namespace base {
+
class FilePath;
class ScopedPathOverride;
-} // namespace base
// The path service is a global table mapping keys to file system paths. It is
// OK to use this service from multiple threads.
@@ -29,7 +29,7 @@ class BASE_EXPORT PathService {
//
// Returns true if the directory or file was successfully retrieved. On
// failure, 'path' will not be changed.
- static bool Get(int key, base::FilePath* path);
+ static bool Get(int key, FilePath* path);
// Overrides the path to a special directory or file. This cannot be used to
// change the value of DIR_CURRENT, but that should be obvious. Also, if the
@@ -44,7 +44,7 @@ class BASE_EXPORT PathService {
//
// Unit tests generally should use ScopedPathOverride instead. Overrides from
// one test should not carry over to another.
- static bool Override(int key, const base::FilePath& path);
+ static bool Override(int key, const FilePath& path);
// This function does the same as PathService::Override but it takes extra
// parameters:
@@ -56,7 +56,7 @@ class BASE_EXPORT PathService {
// - |create| guides whether the directory to be overriden must
// be created in case it doesn't exist already.
static bool OverrideAndCreateIfNeeded(int key,
- const base::FilePath& path,
+ const FilePath& path,
bool is_absolute,
bool create);
@@ -68,7 +68,7 @@ class BASE_EXPORT PathService {
// WARNING: This function could be called on any thread from which the
// PathService is used, so a the ProviderFunc MUST BE THREADSAFE.
//
- typedef bool (*ProviderFunc)(int, base::FilePath*);
+ typedef bool (*ProviderFunc)(int, FilePath*);
// Call to register a path provider. You must specify the range "[key_start,
// key_end)" of supported path keys.
@@ -80,7 +80,7 @@ class BASE_EXPORT PathService {
static void DisableCache();
private:
- friend class base::ScopedPathOverride;
+ friend class ScopedPathOverride;
FRIEND_TEST_ALL_PREFIXES(PathServiceTest, RemoveOverride);
// Removes an override for a special directory or file. Returns true if there
@@ -89,4 +89,9 @@ class BASE_EXPORT PathService {
static bool RemoveOverride(int key);
};
+} // namespace base
+
+// TODO(brettw) Convert all callers to using the base namespace and remove this.
+using base::PathService;
+
#endif // BASE_PATH_SERVICE_H_
« no previous file with comments | « no previous file | base/path_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698