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

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

Issue 2266483002: [Sync] Fix account id comparison for cookie jar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test 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 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <map> 10 #include <map>
(...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 const GoogleServiceAuthError& error) { 2110 const GoogleServiceAuthError& error) {
2111 if (!IsBackendInitialized()) 2111 if (!IsBackendInitialized())
2112 return; 2112 return;
2113 2113
2114 bool cookie_jar_mismatch = true; 2114 bool cookie_jar_mismatch = true;
2115 bool cookie_jar_empty = accounts.size() == 0; 2115 bool cookie_jar_empty = accounts.size() == 0;
2116 std::string account_id = signin_->GetAccountIdToUse(); 2116 std::string account_id = signin_->GetAccountIdToUse();
2117 2117
2118 // Iterate through list of accounts, looking for current sync account. 2118 // Iterate through list of accounts, looking for current sync account.
2119 for (const auto& account : accounts) { 2119 for (const auto& account : accounts) {
2120 if (account.gaia_id == account_id) { 2120 if (account.id == account_id) {
2121 cookie_jar_mismatch = false; 2121 cookie_jar_mismatch = false;
2122 break; 2122 break;
2123 } 2123 }
2124 } 2124 }
2125 2125
2126 DVLOG(1) << "Cookie jar mismatch: " << cookie_jar_mismatch; 2126 DVLOG(1) << "Cookie jar mismatch: " << cookie_jar_mismatch;
2127 DVLOG(1) << "Cookie jar empty: " << cookie_jar_empty; 2127 DVLOG(1) << "Cookie jar empty: " << cookie_jar_empty;
2128 backend_->OnCookieJarChanged(cookie_jar_mismatch, cookie_jar_empty); 2128 backend_->OnCookieJarChanged(cookie_jar_mismatch, cookie_jar_empty);
2129 } 2129 }
2130 2130
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
2535 if (--outstanding_setup_in_progress_handles_ != 0) 2535 if (--outstanding_setup_in_progress_handles_ != 0)
2536 return; 2536 return;
2537 2537
2538 DCHECK(startup_controller_->IsSetupInProgress()); 2538 DCHECK(startup_controller_->IsSetupInProgress());
2539 startup_controller_->SetSetupInProgress(false); 2539 startup_controller_->SetSetupInProgress(false);
2540 2540
2541 if (IsBackendInitialized()) 2541 if (IsBackendInitialized())
2542 ReconfigureDatatypeManager(); 2542 ReconfigureDatatypeManager();
2543 NotifyObservers(); 2543 NotifyObservers();
2544 } 2544 }
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