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

Side by Side Diff: chrome/browser/chromeos/arc/arc_settings_service.cc

Issue 2235293002: arc: Support managed Arc and managed Location Service and B&R consents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2225933002_managed_BR_LOC
Patch Set: don't load ToS for managed arc, add policy indicators 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/arc/arc_settings_service.h" 5 #include "chrome/browser/chromeos/arc/arc_settings_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 void ArcSettingsServiceImpl::SyncRuntimeSettings() const { 201 void ArcSettingsServiceImpl::SyncRuntimeSettings() const {
202 SyncFontSize(); 202 SyncFontSize();
203 SyncLocale(); 203 SyncLocale();
204 SyncProxySettings(); 204 SyncProxySettings();
205 SyncReportingConsent(); 205 SyncReportingConsent();
206 SyncSpokenFeedbackEnabled(); 206 SyncSpokenFeedbackEnabled();
207 SyncTimeZone(); 207 SyncTimeZone();
208 SyncUse24HourClock(); 208 SyncUse24HourClock();
209
210 const PrefService* const prefs =
211 ProfileManager::GetActiveUserProfile()->GetPrefs();
212 if (prefs->IsManagedPreference(prefs::kArcBackupRestoreEnabled))
213 SyncBackupEnabled();
214 if (prefs->IsManagedPreference(prefs::kArcLocationServiceEnabled))
215 SyncLocationServiceEnabled();
209 } 216 }
210 217
211 void ArcSettingsServiceImpl::SyncInitialSettings() const { 218 void ArcSettingsServiceImpl::SyncInitialSettings() const {
212 SyncBackupEnabled(); 219 SyncBackupEnabled();
213 SyncLocationServiceEnabled(); 220 SyncLocationServiceEnabled();
214 } 221 }
215 222
216 void ArcSettingsServiceImpl::StopObservingSettingsChanges() { 223 void ArcSettingsServiceImpl::StopObservingSettingsChanges() {
217 registrar_.RemoveAll(); 224 registrar_.RemoveAll();
218 reporting_consent_subscription_.reset(); 225 reporting_consent_subscription_.reset();
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 449
443 void ArcSettingsService::OnInstanceReady() { 450 void ArcSettingsService::OnInstanceReady() {
444 impl_.reset(new ArcSettingsServiceImpl(arc_bridge_service())); 451 impl_.reset(new ArcSettingsServiceImpl(arc_bridge_service()));
445 } 452 }
446 453
447 void ArcSettingsService::OnInstanceClosed() { 454 void ArcSettingsService::OnInstanceClosed() {
448 impl_.reset(); 455 impl_.reset();
449 } 456 }
450 457
451 } // namespace arc 458 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698