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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 8515030: Do not clear tokens from db when the user enters new credentials. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/signin_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 // two factor signin), so initialize signin_ here. 1069 // two factor signin), so initialize signin_ here.
1070 signin_->Initialize(profile_); 1070 signin_->Initialize(profile_);
1071 } 1071 }
1072 1072
1073 if (!access_code.empty()) { 1073 if (!access_code.empty()) {
1074 signin_->ProvideSecondFactorAccessCode(access_code); 1074 signin_->ProvideSecondFactorAccessCode(access_code);
1075 return; 1075 return;
1076 } 1076 }
1077 1077
1078 if (!signin_->GetUsername().empty()) { 1078 if (!signin_->GetUsername().empty()) {
1079 signin_->SignOut(); 1079 signin_->ClearInMemoryData();
1080 } 1080 }
1081 1081
1082 // The user has submitted credentials, which indicates they don't 1082 // The user has submitted credentials, which indicates they don't
1083 // want to suppress start up anymore. 1083 // want to suppress start up anymore.
1084 sync_prefs_.SetStartSuppressed(false); 1084 sync_prefs_.SetStartSuppressed(false);
1085 1085
1086 signin_->StartSignIn(username, 1086 signin_->StartSignIn(username,
1087 password, 1087 password,
1088 last_auth_error_.captcha().token, 1088 last_auth_error_.captcha().token,
1089 captcha); 1089 captcha);
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 << "Unrecoverable error."; 1555 << "Unrecoverable error.";
1556 } else { 1556 } else {
1557 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " 1557 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not "
1558 << "initialized"; 1558 << "initialized";
1559 } 1559 }
1560 } 1560 }
1561 1561
1562 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { 1562 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() {
1563 return failed_datatypes_handler_; 1563 return failed_datatypes_handler_;
1564 } 1564 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/signin_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698