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

Unified Diff: components/arc/arc_service_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: Addressed comments Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: components/arc/arc_service_manager.h
diff --git a/components/arc/arc_service_manager.h b/components/arc/arc_service_manager.h
index 383ed4722d12e6018639c3ab9be72cdd729076d0..f0c9c58c81c3255663d9d454bba78a2df9a04f16 100644
--- a/components/arc/arc_service_manager.h
+++ b/components/arc/arc_service_manager.h
@@ -6,6 +6,7 @@
#define COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_
#include <memory>
+#include <string>
hidehiko 2016/06/14 02:05:15 unused?
dspaid 2016/06/14 04:34:59 Done.
#include <vector>
#include "base/macros.h"
@@ -13,12 +14,14 @@
#include "base/task_runner.h"
#include "base/threading/thread_checker.h"
#include "components/arc/intent_helper/activity_icon_loader.h"
+#include "components/prefs/pref_member.h"
#include "components/signin/core/account_id/account_id.h"
namespace arc {
class ArcBridgeService;
class ArcService;
+class ArcUserDataService;
// Manages creation and destruction of services that communicate with the ARC
// instance via the ArcBridgeService.
@@ -40,7 +43,12 @@ class ArcServiceManager {
static ArcServiceManager* Get();
// Called when the main profile is initialized after user logs in.
- void OnPrimaryUserProfilePrepared(const AccountId& account_id);
+ void OnPrimaryUserProfilePrepared(
+ const AccountId& account_id,
+ std::unique_ptr<BooleanPrefMember> arc_enabled_pref);
+
+ // Has the user enabled ARC in their preferences?
+ bool IsArcEnabled() const;
// Called once the windowing system (ash) has been started.
void OnAshStarted();
@@ -68,10 +76,16 @@ class ArcServiceManager {
std::vector<std::unique_ptr<ArcService>> services_;
scoped_refptr<ActivityIconLoader> icon_loader_;
+ // This is a week reference to the pointer owned by the services_ vector.
+ ArcUserDataService* arc_user_data_service_;
+
// True once the window manager service got added, barring adding any more
// of those since OnAshStarted() might be called multiple times.
bool on_ash_started_called_ = false;
+ // User preference indicating whether or not ARC has been enabled.
+ std::unique_ptr<BooleanPrefMember> arc_enabled_pref_;
+
DISALLOW_COPY_AND_ASSIGN(ArcServiceManager);
};

Powered by Google App Engine
This is Rietveld 408576698