Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: components/arc/user_data/arc_user_data_service.h

Issue 2133653002: arc: Notify ARC instance failures via callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_ARC_USER_DATA_ARC_USER_DATA_SERVICE 5 #ifndef COMPONENTS_ARC_USER_DATA_ARC_USER_DATA_SERVICE
6 #define COMPONENTS_ARC_USER_DATA_ARC_USER_DATA_SERVICE 6 #define COMPONENTS_ARC_USER_DATA_ARC_USER_DATA_SERVICE
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "components/arc/arc_bridge_service.h" 10 #include "components/arc/arc_bridge_service.h"
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 explicit ArcUserDataService( 24 explicit ArcUserDataService(
25 ArcBridgeService* arc_bridge_service, 25 ArcBridgeService* arc_bridge_service,
26 std::unique_ptr<BooleanPrefMember> arc_enabled_pref, 26 std::unique_ptr<BooleanPrefMember> arc_enabled_pref,
27 const AccountId& account_id); 27 const AccountId& account_id);
28 ~ArcUserDataService() override; 28 ~ArcUserDataService() override;
29 29
30 // ArcBridgeService::Observer: 30 // ArcBridgeService::Observer:
31 // Called whenever the arc bridge is stopped to potentially remove data if 31 // Called whenever the arc bridge is stopped to potentially remove data if
32 // the user has not opted in. 32 // the user has not opted in.
33 void OnBridgeStopped() override; 33 void OnBridgeStopped(ArcBridgeService::StopReason reason) override;
34 34
35 private: 35 private:
36 base::ThreadChecker thread_checker_; 36 base::ThreadChecker thread_checker_;
37 37
38 // Checks if ARC is both stopped and disabled (not opt-in) and triggers 38 // Checks if ARC is both stopped and disabled (not opt-in) and triggers
39 // removal of user data if both conditions are true. 39 // removal of user data if both conditions are true.
40 void ClearIfDisabled(); 40 void ClearIfDisabled();
41 41
42 const std::unique_ptr<BooleanPrefMember> arc_enabled_pref_; 42 const std::unique_ptr<BooleanPrefMember> arc_enabled_pref_;
43 43
44 // Account ID for the account for which we currently have opt-in information. 44 // Account ID for the account for which we currently have opt-in information.
45 AccountId primary_user_account_id_; 45 AccountId primary_user_account_id_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(ArcUserDataService); 47 DISALLOW_COPY_AND_ASSIGN(ArcUserDataService);
48 }; 48 };
49 49
50 } // namespace arc 50 } // namespace arc
51 51
52 #endif // COMPONENTS_ARC_USER_DATA_ARC_USER_DATA_SERVICE 52 #endif // COMPONENTS_ARC_USER_DATA_ARC_USER_DATA_SERVICE
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698