Chromium Code Reviews| Index: chrome/common/chrome_paths.cc |
| diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc |
| index 2333da1fd2489182bccbddf3f90b2d042d9b2699..d34e2479ca45d95c15aac3efa8c56fa2d27700e9 100644 |
| --- a/chrome/common/chrome_paths.cc |
| +++ b/chrome/common/chrome_paths.cc |
| @@ -5,6 +5,7 @@ |
| #include "chrome/common/chrome_paths.h" |
| #include "base/file_util.h" |
| +#include "base/lazy_instance.h" |
| #include "base/logging.h" |
| #include "base/mac/bundle_locations.h" |
| #include "base/path_service.h" |
| @@ -94,9 +95,8 @@ const base::FilePath::CharType kFilepathSinglePrefExtensions[] = |
| #endif // defined(GOOGLE_CHROME_BUILD) |
| #endif // defined(OS_LINUX) |
| -} // namespace |
| - |
| -namespace chrome { |
| +static base::LazyInstance<base::FilePath> |
|
Vitaly Buka (NO REVIEWS)
2014/02/26 01:50:24
Needs
'../base/third_party/dynamic_annotations/dy
msw
2014/02/26 20:34:28
src/base/base.gyp already lists 'dynamic_annotatio
|
| + g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER; |
| // Gets the path for internal plugins. |
| bool GetInternalPluginsDirectory(base::FilePath* result) { |
| @@ -116,6 +116,10 @@ bool GetInternalPluginsDirectory(base::FilePath* result) { |
| return PathService::Get(base::DIR_MODULE, result); |
| } |
| +} // namespace |
| + |
| +namespace chrome { |
| + |
| bool PathProvider(int key, base::FilePath* result) { |
| // Some keys are just aliases... |
| switch (key) { |
| @@ -551,4 +555,12 @@ void RegisterPathProvider() { |
| PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
| } |
| +void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
| + g_invalid_specified_user_data_dir.Get() = user_data_dir; |
| +} |
| + |
| +const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
| + return g_invalid_specified_user_data_dir.Get(); |
| +} |
| + |
| } // namespace chrome |