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

Side by Side Diff: components/browser_sync/browser/profile_sync_service.cc

Issue 2261243003: [Sync] Fix account id comparison for cookie jar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/browser_sync/browser/profile_sync_service.h" 5 #include "components/browser_sync/browser/profile_sync_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after
2109 const GoogleServiceAuthError& error) { 2109 const GoogleServiceAuthError& error) {
2110 if (!IsBackendInitialized()) 2110 if (!IsBackendInitialized())
2111 return; 2111 return;
2112 2112
2113 bool cookie_jar_mismatch = true; 2113 bool cookie_jar_mismatch = true;
2114 bool cookie_jar_empty = accounts.size() == 0; 2114 bool cookie_jar_empty = accounts.size() == 0;
2115 std::string account_id = signin_->GetAccountIdToUse(); 2115 std::string account_id = signin_->GetAccountIdToUse();
2116 2116
2117 // Iterate through list of accounts, looking for current sync account. 2117 // Iterate through list of accounts, looking for current sync account.
2118 for (const auto& account : accounts) { 2118 for (const auto& account : accounts) {
2119 if (account.gaia_id == account_id) { 2119 if (account.id == account_id) {
2120 cookie_jar_mismatch = false; 2120 cookie_jar_mismatch = false;
2121 break; 2121 break;
2122 } 2122 }
2123 } 2123 }
2124 2124
2125 DVLOG(1) << "Cookie jar mismatch: " << cookie_jar_mismatch; 2125 DVLOG(1) << "Cookie jar mismatch: " << cookie_jar_mismatch;
2126 DVLOG(1) << "Cookie jar empty: " << cookie_jar_empty; 2126 DVLOG(1) << "Cookie jar empty: " << cookie_jar_empty;
2127 backend_->OnCookieJarChanged(cookie_jar_mismatch, cookie_jar_empty); 2127 backend_->OnCookieJarChanged(cookie_jar_mismatch, cookie_jar_empty);
2128 } 2128 }
2129 2129
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
2534 if (--outstanding_setup_in_progress_handles_ != 0) 2534 if (--outstanding_setup_in_progress_handles_ != 0)
2535 return; 2535 return;
2536 2536
2537 DCHECK(startup_controller_->IsSetupInProgress()); 2537 DCHECK(startup_controller_->IsSetupInProgress());
2538 startup_controller_->SetSetupInProgress(false); 2538 startup_controller_->SetSetupInProgress(false);
2539 2539
2540 if (IsBackendInitialized()) 2540 if (IsBackendInitialized())
2541 ReconfigureDatatypeManager(); 2541 ReconfigureDatatypeManager();
2542 NotifyObservers(); 2542 NotifyObservers();
2543 } 2543 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698