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

Side by Side Diff: components/sync/driver/sync_prefs.cc

Issue 2277593002: arc: Enable user control for Arc package sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix componets unit_tests Created 4 years, 3 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 (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
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>(); 547 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>();
547 548
548 std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState> result( 549 std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState> result(
549 new syncer::SyncEncryptionHandler::NigoriState()); 550 new syncer::SyncEncryptionHandler::NigoriState());
550 if (!result->nigori_specifics.ParseFromString(decoded)) 551 if (!result->nigori_specifics.ParseFromString(decoded))
551 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>(); 552 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>();
552 return result; 553 return result;
553 } 554 }
554 555
555 } // namespace sync_driver 556 } // namespace sync_driver
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc ('k') | components/sync/driver/sync_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698