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

Unified Diff: base/path_service.h

Issue 8463020: Make sure only the right processes can access the profile path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added user notification for network profiles. Created 8 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 | « 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 4b297385dfb8494ed9c4c68f43f9b8fd3596d3c2..6edc4fd7dd9c7943f2ab3d7535aa94d0ef8a4234 100644
--- a/base/path_service.h
+++ b/base/path_service.h
@@ -40,6 +40,19 @@ class BASE_EXPORT PathService {
// over the lifetime of the app, so this method should be used with caution.
static bool Override(int key, const 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
+ // path specifies a directory that does not exist, the directory will be
+ // created if the |create| flag is set to true. This method returns true if
+ // successful.
+ //
+ // If the given path is relative, then it will be resolved against
+ // DIR_CURRENT.
+ //
+ // WARNING: Consumers of PathService::Get may expect paths to be constant
+ // over the lifetime of the app, so this method should be used with caution.
+ static bool Override(int key, const FilePath& path, bool create);
+
// To extend the set of supported keys, you can register a path provider,
// which is just a function mirroring PathService::Get. The ProviderFunc
// returns false if it cannot provide a non-empty path for the given key.
« 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