| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |