| 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_tracker_service.h" | 5 #include "components/signin/core/browser/account_tracker_service.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | |
| 10 #include "base/logging.h" | 9 #include "base/logging.h" |
| 11 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| 12 #include "base/prefs/scoped_user_pref_update.h" | 11 #include "base/prefs/scoped_user_pref_update.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "base/trace_event/trace_event.h" |
| 14 #include "components/signin/core/browser/refresh_token_annotation_request.h" | 14 #include "components/signin/core/browser/refresh_token_annotation_request.h" |
| 15 #include "components/signin/core/browser/signin_client.h" | 15 #include "components/signin/core/browser/signin_client.h" |
| 16 #include "components/signin/core/browser/signin_manager.h" | 16 #include "components/signin/core/browser/signin_manager.h" |
| 17 #include "components/signin/core/common/signin_pref_names.h" | 17 #include "components/signin/core/common/signin_pref_names.h" |
| 18 #include "components/signin/core/common/signin_switches.h" | 18 #include "components/signin/core/common/signin_switches.h" |
| 19 #include "google_apis/gaia/gaia_auth_util.h" | 19 #include "google_apis/gaia/gaia_auth_util.h" |
| 20 #include "google_apis/gaia/gaia_constants.h" | 20 #include "google_apis/gaia/gaia_constants.h" |
| 21 #include "google_apis/gaia/gaia_oauth_client.h" | 21 #include "google_apis/gaia/gaia_oauth_client.h" |
| 22 #include "net/url_request/url_request_context_getter.h" | 22 #include "net/url_request/url_request_context_getter.h" |
| 23 | 23 |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 DCHECK(!email.empty()); | 587 DCHECK(!email.empty()); |
| 588 const std::string account_id = PickAccountIdForAccount(gaia, email); | 588 const std::string account_id = PickAccountIdForAccount(gaia, email); |
| 589 const bool already_exists = ContainsKey(accounts_, account_id); | 589 const bool already_exists = ContainsKey(accounts_, account_id); |
| 590 StartTrackingAccount(account_id); | 590 StartTrackingAccount(account_id); |
| 591 AccountState& state = accounts_[account_id]; | 591 AccountState& state = accounts_[account_id]; |
| 592 DCHECK(!already_exists || state.info.gaia == gaia); | 592 DCHECK(!already_exists || state.info.gaia == gaia); |
| 593 state.info.gaia = gaia; | 593 state.info.gaia = gaia; |
| 594 state.info.email = email; | 594 state.info.email = email; |
| 595 SaveToPrefs(state); | 595 SaveToPrefs(state); |
| 596 } | 596 } |
| OLD | NEW |