| 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 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ |
| 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 const std::string& gaia, | 101 const std::string& gaia, |
| 102 const std::string& email); | 102 const std::string& email); |
| 103 | 103 |
| 104 // Seeds the account whose account_id is given by PickAccountIdForAccount() | 104 // Seeds the account whose account_id is given by PickAccountIdForAccount() |
| 105 // with its corresponding gaia id and email address. Returns the same | 105 // with its corresponding gaia id and email address. Returns the same |
| 106 // value PickAccountIdForAccount() when given the same arguments. | 106 // value PickAccountIdForAccount() when given the same arguments. |
| 107 std::string SeedAccountInfo(const std::string& gaia, | 107 std::string SeedAccountInfo(const std::string& gaia, |
| 108 const std::string& email); | 108 const std::string& email); |
| 109 void SeedAccountInfo(AccountInfo info); | 109 void SeedAccountInfo(AccountInfo info); |
| 110 | 110 |
| 111 void RemoveAccount(const std::string& account_id); |
| 112 |
| 111 AccountIdMigrationState GetMigrationState(); | 113 AccountIdMigrationState GetMigrationState(); |
| 112 void SetMigrationDone(); | 114 void SetMigrationDone(); |
| 113 static AccountIdMigrationState GetMigrationState(PrefService* pref_service); | 115 static AccountIdMigrationState GetMigrationState(PrefService* pref_service); |
| 114 | 116 |
| 115 protected: | 117 protected: |
| 116 // Available to be called in tests. | 118 // Available to be called in tests. |
| 117 void SetAccountStateFromUserInfo(const std::string& account_id, | 119 void SetAccountStateFromUserInfo(const std::string& account_id, |
| 118 const base::DictionaryValue* user_info); | 120 const base::DictionaryValue* user_info); |
| 119 void SetIsChildAccount(const std::string& account_id, | 121 void SetIsChildAccount(const std::string& account_id, |
| 120 const bool& is_child_account); | 122 const bool& is_child_account); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 144 void SetMigrationState(AccountIdMigrationState state); | 146 void SetMigrationState(AccountIdMigrationState state); |
| 145 | 147 |
| 146 SigninClient* signin_client_; // Not owned. | 148 SigninClient* signin_client_; // Not owned. |
| 147 std::map<std::string, AccountState> accounts_; | 149 std::map<std::string, AccountState> accounts_; |
| 148 base::ObserverList<Observer> observer_list_; | 150 base::ObserverList<Observer> observer_list_; |
| 149 | 151 |
| 150 DISALLOW_COPY_AND_ASSIGN(AccountTrackerService); | 152 DISALLOW_COPY_AND_ASSIGN(AccountTrackerService); |
| 151 }; | 153 }; |
| 152 | 154 |
| 153 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ | 155 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ |
| OLD | NEW |