| 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/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 void SyncPrefs::SetManagedForTest(bool is_managed) { | 348 void SyncPrefs::SetManagedForTest(bool is_managed) { |
| 349 DCHECK(CalledOnValidThread()); | 349 DCHECK(CalledOnValidThread()); |
| 350 pref_service_->SetBoolean(prefs::kSyncManaged, is_managed); | 350 pref_service_->SetBoolean(prefs::kSyncManaged, is_managed); |
| 351 } | 351 } |
| 352 | 352 |
| 353 void SyncPrefs::RegisterPrefGroups() { | 353 void SyncPrefs::RegisterPrefGroups() { |
| 354 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS); | 354 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS); |
| 355 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS); | 355 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS); |
| 356 pref_groups_[syncer::APPS].Put(syncer::APP_LIST); | 356 pref_groups_[syncer::APPS].Put(syncer::APP_LIST); |
| 357 pref_groups_[syncer::APPS].Put(syncer::ARC_PACKAGE); |
| 357 | 358 |
| 358 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); | 359 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); |
| 359 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_WALLET_DATA); | 360 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_WALLET_DATA); |
| 360 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_WALLET_METADATA); | 361 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_WALLET_METADATA); |
| 361 | 362 |
| 362 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); | 363 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); |
| 363 | 364 |
| 364 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); | 365 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); |
| 365 pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES); | 366 pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES); |
| 366 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); | 367 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>(); | 548 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>(); |
| 548 | 549 |
| 549 std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState> result( | 550 std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState> result( |
| 550 new syncer::SyncEncryptionHandler::NigoriState()); | 551 new syncer::SyncEncryptionHandler::NigoriState()); |
| 551 if (!result->nigori_specifics.ParseFromString(decoded)) | 552 if (!result->nigori_specifics.ParseFromString(decoded)) |
| 552 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>(); | 553 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>(); |
| 553 return result; | 554 return result; |
| 554 } | 555 } |
| 555 | 556 |
| 556 } // namespace sync_driver | 557 } // namespace sync_driver |
| OLD | NEW |