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