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 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/json/json_reader.h" | 12 #include "base/json/json_reader.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
17 #include "base/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 19 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
20 #include "components/signin/core/browser/signin_client.h" | 20 #include "components/signin/core/browser/signin_client.h" |
21 #include "components/signin/core/browser/signin_metrics.h" | 21 #include "components/signin/core/browser/signin_metrics.h" |
22 #include "components/signin/core/common/profile_management_switches.h" | 22 #include "components/signin/core/common/profile_management_switches.h" |
23 #include "google_apis/gaia/gaia_auth_util.h" | 23 #include "google_apis/gaia/gaia_auth_util.h" |
24 #include "google_apis/gaia/gaia_oauth_client.h" | 24 #include "google_apis/gaia/gaia_oauth_client.h" |
25 #include "google_apis/gaia/gaia_urls.h" | 25 #include "google_apis/gaia/gaia_urls.h" |
26 | 26 |
27 namespace { | 27 namespace { |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 << "Account added: " << account_id << ", " | 492 << "Account added: " << account_id << ", " |
493 << "Error was " << error.ToString(); | 493 << "Error was " << error.ToString(); |
494 // Always listens to GaiaCookieManagerService. Only proceed if reconciling. | 494 // Always listens to GaiaCookieManagerService. Only proceed if reconciling. |
495 if (is_reconcile_started_ && MarkAccountAsAddedToCookie(account_id)) { | 495 if (is_reconcile_started_ && MarkAccountAsAddedToCookie(account_id)) { |
496 if (error.state() != GoogleServiceAuthError::State::NONE) | 496 if (error.state() != GoogleServiceAuthError::State::NONE) |
497 error_during_last_reconcile_ = true; | 497 error_during_last_reconcile_ = true; |
498 CalculateIfReconcileIsDone(); | 498 CalculateIfReconcileIsDone(); |
499 ScheduleStartReconcileIfChromeAccountsChanged(); | 499 ScheduleStartReconcileIfChromeAccountsChanged(); |
500 } | 500 } |
501 } | 501 } |
OLD | NEW |