X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fcommon%2Fchrome_paths.cc;h=d34e2479ca45d95c15aac3efa8c56fa2d27700e9;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=2333da1fd2489182bccbddf3f90b2d042d9b2699;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/common/chrome_paths.cc b/src/chrome/common/chrome_paths.cc index 2333da1..d34e247 100644 --- a/src/chrome/common/chrome_paths.cc +++ b/src/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 + 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