| Index: chrome/common/chrome_paths_win.cc
|
| diff --git a/chrome/common/chrome_paths_win.cc b/chrome/common/chrome_paths_win.cc
|
| index dc2502f0b2f88a6463cf443bebb29f1f6311e3fd..21d9a35d11527ac235f688d7ffd7ae0297e6d0a9 100644
|
| --- a/chrome/common/chrome_paths_win.cc
|
| +++ b/chrome/common/chrome_paths_win.cc
|
| @@ -20,17 +20,31 @@
|
|
|
| namespace chrome {
|
|
|
| -bool GetDefaultUserDataDirectory(FilePath* result) {
|
| +namespace {
|
| +
|
| +// Gets the default user data directory for either the current environment
|
| +// (desktop or metro) or for the other one (metro or desktop).
|
| +bool GetUserDataDirectoryForEnvironment(bool current, FilePath* result) {
|
| if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result))
|
| return false;
|
| BrowserDistribution* dist = BrowserDistribution::GetDistribution();
|
| *result = result->Append(dist->GetInstallSubDir());
|
| - if (base::win::GetMetroModule())
|
| + if (base::win::GetMetroModule() ? current : !current)
|
| *result = result->Append(kMetroChromeUserDataSubDir);
|
| *result = result->Append(chrome::kUserDataDirname);
|
| return true;
|
| }
|
|
|
| +} // namespace
|
| +
|
| +bool GetDefaultUserDataDirectory(FilePath* result) {
|
| + return GetUserDataDirectoryForEnvironment(true, result);
|
| +}
|
| +
|
| +bool GetAlternateUserDataDirectory(FilePath *result) {
|
| + return GetUserDataDirectoryForEnvironment(false, result);
|
| +}
|
| +
|
| bool GetChromeFrameUserDataDirectory(FilePath* result) {
|
| if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result))
|
| return false;
|
|
|