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

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: 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
19 // necessary.
stevenjb 2016/05/13 17:13:55 May I suggest renaming this something like ArcUser
dspaid 2016/05/17 01:56:14 Done.
20 class ArcDataManager : public ArcBridgeService::Observer {
21 public:
22 ArcDataManager();
23 ~ArcDataManager() override;
24
25 static ArcDataManager* Get();
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 // ArcBridgeService::Observer:
34 void OnStateChanged(ArcBridgeService::State state) override;
35
36 private:
37 base::ThreadChecker thread_checker_;
38
39 DISALLOW_COPY_AND_ASSIGN(ArcDataManager);
40 };
41
42 } // namespace arc
43
44 #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