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

Side by Side Diff: components/signin/core/browser/account_reconcilor.cc

Issue 1767423002: [Do not commit] Track revocations in content_settings::Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « components/signin/core/browser/account_reconcilor.h ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/signin/core/browser/account_reconcilor.h" 5 #include "components/signin/core/browser/account_reconcilor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 : signin_metrics::ACCOUNT_RECONCILOR_OK; 185 : signin_metrics::ACCOUNT_RECONCILOR_OK;
186 } 186 }
187 187
188 return signin_metrics::ACCOUNT_RECONCILOR_RUNNING; 188 return signin_metrics::ACCOUNT_RECONCILOR_RUNNING;
189 } 189 }
190 190
191 void AccountReconcilor::OnContentSettingChanged( 191 void AccountReconcilor::OnContentSettingChanged(
192 const ContentSettingsPattern& primary_pattern, 192 const ContentSettingsPattern& primary_pattern,
193 const ContentSettingsPattern& secondary_pattern, 193 const ContentSettingsPattern& secondary_pattern,
194 ContentSettingsType content_type, 194 ContentSettingsType content_type,
195 ContentSetting previous_value,
195 std::string resource_identifier) { 196 std::string resource_identifier) {
196 // If this is not a change to cookie settings, just ignore. 197 // If this is not a change to cookie settings, just ignore.
197 if (content_type != CONTENT_SETTINGS_TYPE_COOKIES) 198 if (content_type != CONTENT_SETTINGS_TYPE_COOKIES)
198 return; 199 return;
199 200
200 // If this does not affect GAIA, just ignore. If the primary pattern is 201 // If this does not affect GAIA, just ignore. If the primary pattern is
201 // invalid, then assume it could affect GAIA. The secondary pattern is 202 // invalid, then assume it could affect GAIA. The secondary pattern is
202 // not needed. 203 // not needed.
203 if (primary_pattern.IsValid() && 204 if (primary_pattern.IsValid() &&
204 !primary_pattern.Matches(GaiaUrls::GetInstance()->gaia_url())) { 205 !primary_pattern.Matches(GaiaUrls::GetInstance()->gaia_url())) {
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 << "Account added: " << account_id << ", " 493 << "Account added: " << account_id << ", "
493 << "Error was " << error.ToString(); 494 << "Error was " << error.ToString();
494 // Always listens to GaiaCookieManagerService. Only proceed if reconciling. 495 // Always listens to GaiaCookieManagerService. Only proceed if reconciling.
495 if (is_reconcile_started_ && MarkAccountAsAddedToCookie(account_id)) { 496 if (is_reconcile_started_ && MarkAccountAsAddedToCookie(account_id)) {
496 if (error.state() != GoogleServiceAuthError::State::NONE) 497 if (error.state() != GoogleServiceAuthError::State::NONE)
497 error_during_last_reconcile_ = true; 498 error_during_last_reconcile_ = true;
498 CalculateIfReconcileIsDone(); 499 CalculateIfReconcileIsDone();
499 ScheduleStartReconcileIfChromeAccountsChanged(); 500 ScheduleStartReconcileIfChromeAccountsChanged();
500 } 501 }
501 } 502 }
OLDNEW
« no previous file with comments | « components/signin/core/browser/account_reconcilor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698