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

Unified Diff: chrome/browser/sync/engine/syncapi.cc

Issue 500120: Added switch to invalidate sync login. (Closed)
Patch Set: synced to head Created 11 years 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 | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncapi.cc
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc
index bfcd736719ebd51afc66e67d7620c194140f2f41..2f03aa9c0edb023f4dde43fab3a649ec1fbaf6b4 100755
--- a/chrome/browser/sync/engine/syncapi.cc
+++ b/chrome/browser/sync/engine/syncapi.cc
@@ -44,6 +44,7 @@
#include "chrome/browser/sync/util/event_sys.h"
#include "chrome/browser/sync/util/path_helpers.h"
#include "chrome/browser/sync/util/user_settings.h"
+#include "chrome/common/chrome_switches.h"
#if defined(OS_WIN)
#pragma comment(lib, "iphlpapi.lib")
@@ -1021,6 +1022,12 @@ bool SyncManager::SyncInternal::Init(
if (attempt_last_user_authentication &&
auth_watcher()->settings()->GetLastUserAndServiceToken(
SYNC_SERVICE_NAME, &username, &auth_token)) {
+#ifndef NDEBUG
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kInvalidateSyncLogin)) {
+ auth_token += "bogus";
+ }
+#endif
attempting_auth = AuthenticateForUser(username, auth_token);
} else if (!lsid.empty()) {
attempting_auth = true;
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698