| 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 <stddef.h> |
| 8 |
| 7 #include "base/callback.h" | 9 #include "base/callback.h" |
| 8 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 11 #include "base/logging.h" |
| 10 #include "base/prefs/scoped_user_pref_update.h" | 12 #include "base/prefs/scoped_user_pref_update.h" |
| 11 #include "base/profiler/scoped_tracker.h" | 13 #include "base/profiler/scoped_tracker.h" |
| 12 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 14 #include "base/trace_event/trace_event.h" | 16 #include "base/trace_event/trace_event.h" |
| 17 #include "build/build_config.h" |
| 15 #include "components/pref_registry/pref_registry_syncable.h" | 18 #include "components/pref_registry/pref_registry_syncable.h" |
| 16 #include "components/signin/core/browser/signin_client.h" | 19 #include "components/signin/core/browser/signin_client.h" |
| 17 #include "components/signin/core/browser/signin_manager.h" | 20 #include "components/signin/core/browser/signin_manager.h" |
| 18 #include "components/signin/core/common/signin_pref_names.h" | 21 #include "components/signin/core/common/signin_pref_names.h" |
| 19 | 22 |
| 20 namespace { | 23 namespace { |
| 21 | 24 |
| 22 const char kAccountKeyPath[] = "account_id"; | 25 const char kAccountKeyPath[] = "account_id"; |
| 23 const char kAccountEmailPath[] = "email"; | 26 const char kAccountEmailPath[] = "email"; |
| 24 const char kAccountGaiaPath[] = "gaia"; | 27 const char kAccountGaiaPath[] = "gaia"; |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 AccountState& state = accounts_[info.account_id]; | 499 AccountState& state = accounts_[info.account_id]; |
| 497 state.info = info; | 500 state.info = info; |
| 498 NotifyAccountUpdated(state); | 501 NotifyAccountUpdated(state); |
| 499 SaveToPrefs(state); | 502 SaveToPrefs(state); |
| 500 } | 503 } |
| 501 } | 504 } |
| 502 | 505 |
| 503 void AccountTrackerService::RemoveAccount(const std::string& account_id) { | 506 void AccountTrackerService::RemoveAccount(const std::string& account_id) { |
| 504 StopTrackingAccount(account_id); | 507 StopTrackingAccount(account_id); |
| 505 } | 508 } |
| OLD | NEW |