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

Unified Diff: components/arc/arc_prefs.cc

Issue 1416313004: arc-bridge: Start ArcBridgeService on session start (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Moved all ARC-related initialization to ChromeShellDelegate Created 5 years, 1 month 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_prefs.cc
diff --git a/components/arc/arc_prefs.cc b/components/arc/arc_prefs.cc
new file mode 100644
index 0000000000000000000000000000000000000000..47cbece38adb5871c929cdec1b1d693a615e22a1
--- /dev/null
+++ b/components/arc/arc_prefs.cc
@@ -0,0 +1,34 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/arc/arc_prefs.h"
+
+#include "base/command_line.h"
+#include "base/prefs/pref_registry_simple.h"
+#include "base/prefs/pref_service.h"
+#include "chromeos/chromeos_switches.h"
+#include "components/arc/arc_pref_names.h"
+
+namespace arc {
+
+// static
+void ArcPrefs::RegisterProfilePrefs(PrefRegistrySimple* registry) {
+ DCHECK(registry);
+ registry->RegisterBooleanPref(arc::prefs::kArcEnabled, false);
+}
+
+// static
+bool ArcPrefs::GetEnabled(const PrefService* prefs,
+ const base::CommandLine* command_line) {
+ return command_line->HasSwitch(chromeos::switches::kEnableArc) ||
+ (prefs && prefs->GetBoolean(arc::prefs::kArcEnabled));
+}
+
+// static
+void ArcPrefs::SetEnabled(PrefService* prefs, bool enabled) {
+ DCHECK(prefs);
+ prefs->SetBoolean(arc::prefs::kArcEnabled, enabled);
+}
+
+} // namespace arc
« chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc ('K') | « components/arc/arc_prefs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698