Chromium Code Reviews| Index: base/path_service.h |
| diff --git a/base/path_service.h b/base/path_service.h |
| index 9759754377f9a060b04e6503e12884d395b7217a..ec53c791e5da179b3b50cf7f998a62223ac8592c 100644 |
| --- a/base/path_service.h |
| +++ b/base/path_service.h |
| @@ -53,6 +53,13 @@ class BASE_EXPORT PathService { |
| const base::FilePath& path, |
| bool create); |
| + // This function also does the same as PathService::Override but |path| must |
| + // already be an absolute path. This can be used to override paths to |
| + // non-existent files in posix systems, since Override relies on realpath() |
| + // and that fails if the path doesn't exist. |
| + // If |path| is a directory then it isn't created by this method. |
| + static void OverrideWithAbsolutePath(int key, const base::FilePath& path); |
|
brettw
2014/04/29 22:41:51
I'd rather see this as an additional flag to Overr
Joao da Silva
2014/04/30 13:08:06
Done.
|
| + |
| // 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. |