Chromium Code Reviews| Index: components/arc/user_data/arc_user_data_service.h |
| diff --git a/components/arc/user_data/arc_user_data_service.h b/components/arc/user_data/arc_user_data_service.h |
| index 38ea0f99973ec2f98025405f19e21c3a2fc22df4..4691e4592d5982010720b687d3c8e29305ff2070 100644 |
| --- a/components/arc/user_data/arc_user_data_service.h |
| +++ b/components/arc/user_data/arc_user_data_service.h |
| @@ -11,9 +11,12 @@ |
| #include "base/threading/thread_checker.h" |
| #include "components/arc/arc_bridge_service.h" |
| #include "components/arc/arc_service.h" |
| +#include "components/prefs/pref_change_registrar.h" |
| #include "components/prefs/pref_member.h" |
| #include "components/signin/core/account_id/account_id.h" |
| +class PrefService; |
|
hidehiko
2016/07/19 02:08:29
Unused.
dspaid
2016/07/19 02:11:17
Done.
|
| + |
| namespace arc { |
| class ArcBridgeService; |
| @@ -41,11 +44,26 @@ class ArcUserDataService : public ArcService, |
| // removal of user data if both conditions are true. |
| void ClearIfDisabled(); |
| + // Callback when the kArcEnabled preference changes. It watches for instances |
| + // where the preference is disabled and remembers this so that it can wipe |
| + // user data once the bridge has stopped. |
| + void OnOptInPreferenceChanged(); |
| + |
| const std::unique_ptr<BooleanPrefMember> arc_enabled_pref_; |
| // Account ID for the account for which we currently have opt-in information. |
| AccountId primary_user_account_id_; |
| + // Registrar used to monitor ARC enabled state. |
| + PrefChangeRegistrar pref_change_registrar_; |
| + |
| + // Set to true when kArcEnabled goes from true to false and set to false |
| + // again after user data has been wiped. This ensures data is wiped even if |
| + // the user tries to enable ARC before the bridge has shut down. |
| + bool arc_disabled_ = false; |
| + |
| + base::WeakPtrFactory<ArcUserDataService> weak_ptr_factory_; |
|
hidehiko
2016/07/19 02:08:29
Could you add #include?
dspaid
2016/07/19 02:11:17
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(ArcUserDataService); |
| }; |