| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/sync_driver/sync_prefs.h" | 5 #include "components/sync_driver/sync_prefs.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/prefs/pref_member.h" | |
| 10 #include "base/prefs/pref_service.h" | |
| 11 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/values.h" | 10 #include "base/values.h" |
| 13 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 14 #include "components/pref_registry/pref_registry_syncable.h" | 12 #include "components/pref_registry/pref_registry_syncable.h" |
| 13 #include "components/prefs/pref_member.h" |
| 14 #include "components/prefs/pref_service.h" |
| 15 #include "components/sync_driver/pref_names.h" | 15 #include "components/sync_driver/pref_names.h" |
| 16 | 16 |
| 17 namespace sync_driver { | 17 namespace sync_driver { |
| 18 | 18 |
| 19 SyncPrefObserver::~SyncPrefObserver() {} | 19 SyncPrefObserver::~SyncPrefObserver() {} |
| 20 | 20 |
| 21 SyncPrefs::SyncPrefs(PrefService* pref_service) : pref_service_(pref_service) { | 21 SyncPrefs::SyncPrefs(PrefService* pref_service) : pref_service_(pref_service) { |
| 22 DCHECK(pref_service); | 22 DCHECK(pref_service); |
| 23 RegisterPrefGroups(); | 23 RegisterPrefGroups(); |
| 24 // Watch the preference that indicates sync is managed so we can take | 24 // Watch the preference that indicates sync is managed so we can take |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 return scoped_ptr<syncer::SyncEncryptionHandler::NigoriState>(); | 554 return scoped_ptr<syncer::SyncEncryptionHandler::NigoriState>(); |
| 555 | 555 |
| 556 scoped_ptr<syncer::SyncEncryptionHandler::NigoriState> result( | 556 scoped_ptr<syncer::SyncEncryptionHandler::NigoriState> result( |
| 557 new syncer::SyncEncryptionHandler::NigoriState()); | 557 new syncer::SyncEncryptionHandler::NigoriState()); |
| 558 if (!result->nigori_specifics.ParseFromString(decoded)) | 558 if (!result->nigori_specifics.ParseFromString(decoded)) |
| 559 return scoped_ptr<syncer::SyncEncryptionHandler::NigoriState>(); | 559 return scoped_ptr<syncer::SyncEncryptionHandler::NigoriState>(); |
| 560 return result; | 560 return result; |
| 561 } | 561 } |
| 562 | 562 |
| 563 } // namespace sync_driver | 563 } // namespace sync_driver |
| OLD | NEW |