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

Unified Diff: chrome/common/chrome_paths_win.cc

Issue 10867019: [sync] Add hooks to allow for testing sync credential caching in the presence of strange singleton … (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 | « chrome/browser/sync/credential_cache_service_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_paths_win.cc
diff --git a/chrome/common/chrome_paths_win.cc b/chrome/common/chrome_paths_win.cc
index e5f2a31ef3c332748f21ceb9c13f9e977e626a0c..7d009d00d7e45b6cff074088b765a1cc2ff6b6c3 100644
--- a/chrome/common/chrome_paths_win.cc
+++ b/chrome/common/chrome_paths_win.cc
@@ -10,11 +10,13 @@
#include <shlobj.h>
#include <shobjidl.h>
+#include "base/command_line.h"
#include "base/file_path.h"
#include "base/path_service.h"
#include "base/win/metro.h"
#include "base/win/scoped_co_mem.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/browser_distribution.h"
#include "content/public/common/content_switches.h"
@@ -29,6 +31,16 @@ bool GetUserDataDirectoryForEnvironment(bool current, FilePath* result) {
return false;
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
*result = result->Append(dist->GetInstallSubDir());
+
+ // TODO(rsimha): Continue to return the "Metro" subdirectory to allow testing
+ // of sync credential caching in the presence of strange singleton mode.
+ // Delete this block before shipping. See http://crbug.com/144280.
+ const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if ((command_line->HasSwitch(switches::kEnableSyncCredentialCaching)) &&
+ (base::win::IsMetroProcess() ? current : !current)) {
+ *result = result->Append(kMetroChromeUserDataSubDir);
+ }
+
*result = result->Append(chrome::kUserDataDirname);
return true;
}
« no previous file with comments | « chrome/browser/sync/credential_cache_service_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698