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

Side by Side Diff: chrome/browser/chromeos/arc/arc_data_manager.h

Issue 1966133002: Run RemoveArcData after a user has opted out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added comment Created 4 years, 7 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
(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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_data_manager.cc » ('j') | chrome/browser/chromeos/arc/arc_data_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698