OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |