| 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 CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_CHILD_ACCOUNT_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_CHILD_ACCOUNT_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_CHILD_ACCOUNT_SERVICE_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_CHILD_ACCOUNT_SERVICE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
| 17 #include "chrome/browser/supervised_user/child_accounts/family_info_fetcher.h" | 17 #include "chrome/browser/supervised_user/child_accounts/family_info_fetcher.h" |
| 18 #include "chrome/browser/supervised_user/supervised_user_service.h" | 18 #include "chrome/browser/supervised_user/supervised_user_service.h" |
| 19 #include "components/keyed_service/core/keyed_service.h" | 19 #include "components/keyed_service/core/keyed_service.h" |
| 20 #include "components/signin/core/browser/account_tracker_service.h" | 20 #include "components/signin/core/browser/account_tracker_service.h" |
| 21 #include "net/base/backoff_entry.h" | 21 #include "net/base/backoff_entry.h" |
| 22 | 22 |
| 23 namespace base { | 23 namespace base { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 void SetSecondCustodianPrefs( | 85 void SetSecondCustodianPrefs( |
| 86 const FamilyInfoFetcher::FamilyMember& custodian); | 86 const FamilyInfoFetcher::FamilyMember& custodian); |
| 87 void ClearFirstCustodianPrefs(); | 87 void ClearFirstCustodianPrefs(); |
| 88 void ClearSecondCustodianPrefs(); | 88 void ClearSecondCustodianPrefs(); |
| 89 | 89 |
| 90 // Owns us via the KeyedService mechanism. | 90 // Owns us via the KeyedService mechanism. |
| 91 Profile* profile_; | 91 Profile* profile_; |
| 92 | 92 |
| 93 bool active_; | 93 bool active_; |
| 94 | 94 |
| 95 scoped_ptr<FamilyInfoFetcher> family_fetcher_; | 95 std::unique_ptr<FamilyInfoFetcher> family_fetcher_; |
| 96 // If fetching the family info fails, retry with exponential backoff. | 96 // If fetching the family info fails, retry with exponential backoff. |
| 97 base::OneShotTimer family_fetch_timer_; | 97 base::OneShotTimer family_fetch_timer_; |
| 98 net::BackoffEntry family_fetch_backoff_; | 98 net::BackoffEntry family_fetch_backoff_; |
| 99 | 99 |
| 100 // Callbacks to run when the user status becomes known. | 100 // Callbacks to run when the user status becomes known. |
| 101 std::vector<base::Closure> status_received_callback_list_; | 101 std::vector<base::Closure> status_received_callback_list_; |
| 102 | 102 |
| 103 base::WeakPtrFactory<ChildAccountService> weak_ptr_factory_; | 103 base::WeakPtrFactory<ChildAccountService> weak_ptr_factory_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(ChildAccountService); | 105 DISALLOW_COPY_AND_ASSIGN(ChildAccountService); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 #endif // CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_CHILD_ACCOUNT_SERVICE_H
_ | 108 #endif // CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_CHILD_ACCOUNT_SERVICE_H
_ |
| OLD | NEW |