Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_DATA_MANAGER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_DATA_MANAGER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/threading/thread_checker.h" | |
| 10 #include "components/arc/arc_bridge_service.h" | |
| 11 | |
| 12 class Profile; | |
| 13 | |
| 14 namespace arc { | |
| 15 | |
| 16 class ArcBridgeService; | |
| 17 | |
| 18 // This class controls the lifecycle of arc user data, removing it when | |
|
Daniel Erat
2016/05/12 16:33:35
nit: s/arc/ARC/
dspaid
2016/05/13 01:19:25
Done.
| |
| 19 // necessary. | |
| 20 class ArcDataManager : public ArcBridgeService::Observer { | |
| 21 public: | |
| 22 ArcDataManager(); | |
| 23 ~ArcDataManager(); | |
|
Daniel Erat
2016/05/12 16:33:34
override
dspaid
2016/05/13 01:19:24
Done.
| |
| 24 | |
| 25 static ArcDataManager* Get(); | |
|
Daniel Erat
2016/05/12 16:33:35
if at all possible, please instead pass the instan
dspaid
2016/05/13 01:19:24
I'm open to suggestions here. The current use is
stevenjb
2016/05/13 17:13:54
We should at least make this consistent with other
dspaid
2016/05/17 01:56:14
Done.
| |
| 26 | |
| 27 // Checks if arc is both stopped and disabled (opt-out) and triggers removal | |
| 28 // of user data if both conditions are true. | |
| 29 void ClearIfDisabled(Profile* profile); | |
| 30 | |
| 31 // Called whenever arc service state changes to potentially remove data if | |
| 32 // the user has opted out. | |
| 33 void OnStateChanged(ArcBridgeService::State state) override; | |
|
Daniel Erat
2016/05/12 16:33:35
nit: add an:
// ArcBridgeService::Observer:
co
dspaid
2016/05/13 01:19:25
Done.
| |
| 34 | |
| 35 private: | |
| 36 base::ThreadChecker thread_checker_; | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(ArcDataManager); | |
| 39 }; | |
| 40 | |
| 41 } // namespace arc | |
| 42 | |
| 43 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_DATA_MANAGER_H_ | |
| OLD | NEW |