Chromium Code Reviews| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 | 131 |
| 132 protected: | 132 protected: |
| 133 // Available to be called in tests. | 133 // Available to be called in tests. |
| 134 void SetAccountStateFromUserInfo(const std::string& account_id, | 134 void SetAccountStateFromUserInfo(const std::string& account_id, |
| 135 const base::DictionaryValue* user_info); | 135 const base::DictionaryValue* user_info); |
| 136 void SetIsChildAccount(const std::string& account_id, | 136 void SetIsChildAccount(const std::string& account_id, |
| 137 const bool& is_child_account); | 137 const bool& is_child_account); |
| 138 | 138 |
| 139 private: | 139 private: |
| 140 friend class AccountFetcherService; | 140 friend class AccountFetcherService; |
| 141 friend class AccountTrackerServiceAndroid; | |
|
Roger Tawa OOO till Jul 10th
2015/08/14 15:01:22
Instead of making this a friend, let's add a new f
gogerald1
2015/08/18 01:14:27
Done.
| |
| 141 friend class FakeAccountFetcherService; | 142 friend class FakeAccountFetcherService; |
| 142 struct AccountState { | 143 struct AccountState { |
| 143 AccountInfo info; | 144 AccountInfo info; |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 void NotifyAccountUpdated(const AccountState& state); | 147 void NotifyAccountUpdated(const AccountState& state); |
| 147 void NotifyAccountUpdateFailed(const std::string& account_id); | 148 void NotifyAccountUpdateFailed(const std::string& account_id); |
| 148 void NotifyAccountRemoved(const AccountState& state); | 149 void NotifyAccountRemoved(const AccountState& state); |
| 149 | 150 |
| 150 void StartTrackingAccount(const std::string& account_id); | 151 void StartTrackingAccount(const std::string& account_id); |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 161 void SetMigrationState(AccountIdMigrationState state); | 162 void SetMigrationState(AccountIdMigrationState state); |
| 162 | 163 |
| 163 SigninClient* signin_client_; // Not owned. | 164 SigninClient* signin_client_; // Not owned. |
| 164 std::map<std::string, AccountState> accounts_; | 165 std::map<std::string, AccountState> accounts_; |
| 165 base::ObserverList<Observer> observer_list_; | 166 base::ObserverList<Observer> observer_list_; |
| 166 | 167 |
| 167 DISALLOW_COPY_AND_ASSIGN(AccountTrackerService); | 168 DISALLOW_COPY_AND_ASSIGN(AccountTrackerService); |
| 168 }; | 169 }; |
| 169 | 170 |
| 170 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ | 171 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ |
| OLD | NEW |