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

Unified Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 2206883002: Do not sync ARC opt-in preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODOs Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_auth_service.cc
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc
index 105058e76429c0910ea60c7fddb1e9116abed216..aa330059fcbee8ee03fa40d76a47d36b070dc557 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -153,9 +153,9 @@ ArcAuthService* ArcAuthService::Get() {
// static
void ArcAuthService::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
- registry->RegisterBooleanPref(
- prefs::kArcEnabled, false,
- user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+ // TODO(dspaid): Implement a mechanism to allow this to sync on first boot
+ // only.
+ registry->RegisterBooleanPref(prefs::kArcEnabled, false);
registry->RegisterBooleanPref(prefs::kArcSignedIn, false);
registry->RegisterBooleanPref(prefs::kArcBackupRestoreEnabled, true);
registry->RegisterBooleanPref(prefs::kArcLocationServiceEnabled, true);
@@ -519,6 +519,9 @@ void ArcAuthService::OnOptInPreferenceChanged() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(profile_);
+ // TODO(dspaid): Move code from OnSyncedPrefChanged into this method.
+ OnSyncedPrefChanged(prefs::kArcEnabled, IsArcManaged());
+
const bool arc_enabled = IsArcEnabled();
FOR_EACH_OBSERVER(Observer, observer_list_, OnOptInEnabled(arc_enabled));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698