OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 #include "components/arc/arc_prefs.h" |
| 6 |
| 7 #include "base/prefs/pref_registry_simple.h" |
| 8 #include "base/prefs/pref_service.h" |
| 9 #include "components/arc/arc_pref_names.h" |
| 10 |
| 11 namespace arc { |
| 12 |
| 13 // static |
| 14 void ArcPrefs::RegisterProfilePrefs(PrefRegistrySimple* registry) { |
| 15 DCHECK(registry); |
| 16 registry->RegisterBooleanPref(arc::prefs::kArcEnabled, false); |
| 17 } |
| 18 |
| 19 // static |
| 20 bool ArcPrefs::GetEnabled(const PrefService* prefs) { |
| 21 DCHECK(prefs); |
| 22 return prefs->GetBoolean(arc::prefs::kArcEnabled); |
| 23 } |
| 24 |
| 25 // static |
| 26 void ArcPrefs::SetEnabled(PrefService* prefs, bool enabled) { |
| 27 DCHECK(prefs); |
| 28 prefs->SetBoolean(arc::prefs::kArcEnabled, enabled); |
| 29 } |
| 30 |
| 31 } // namespace arc |
OLD | NEW |