summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/sync_prefs_unittest.cc
diff options
context:
space:
mode:
authorkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-02 16:08:31 +0000
committerkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-02 16:08:31 +0000
commit50adc0e144add6f4debcceceb90d7faddbdc7b65 (patch)
tree39ea4d28247343872c94c6745fd3fe293cc5d78b /chrome/browser/sync/sync_prefs_unittest.cc
parent39d1002c5fd20a1e5f1653c67fee95db90ba612f (diff)
downloadchromium_src-50adc0e144add6f4debcceceb90d7faddbdc7b65.zip
chromium_src-50adc0e144add6f4debcceceb90d7faddbdc7b65.tar.gz
chromium_src-50adc0e144add6f4debcceceb90d7faddbdc7b65.tar.bz2
Add a declarative way in c/b/s/sync_prefs.cc to say which data types have prefs
whose values are determined by others (e.g. APP_NOTIFICATIONS on APPS). Make the hand-written code use the system, and add {APP,EXTENSION}_SETTINGS. R=akalin@chromium.org TBR=estade@chromium.org BUG=114974 TEST=unit_tests --gtest_filter=*Sync* Review URL: http://codereview.chromium.org/9500005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124658 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/sync_prefs_unittest.cc')
-rw-r--r--chrome/browser/sync/sync_prefs_unittest.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/sync/sync_prefs_unittest.cc b/chrome/browser/sync/sync_prefs_unittest.cc
index 0064137..916c515 100644
--- a/chrome/browser/sync/sync_prefs_unittest.cc
+++ b/chrome/browser/sync/sync_prefs_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -36,9 +36,11 @@ syncable::ModelTypeSet GetNonPassiveTypes() {
// Returns all types visible from the setup UI.
syncable::ModelTypeSet GetUserVisibleTypes() {
syncable::ModelTypeSet user_visible_types(GetNonPassiveTypes());
+ user_visible_types.Remove(syncable::APP_NOTIFICATIONS);
+ user_visible_types.Remove(syncable::APP_SETTINGS);
user_visible_types.Remove(syncable::AUTOFILL_PROFILE);
+ user_visible_types.Remove(syncable::EXTENSION_SETTINGS);
user_visible_types.Remove(syncable::SEARCH_ENGINES);
- user_visible_types.Remove(syncable::APP_NOTIFICATIONS);
return user_visible_types;
}
@@ -112,6 +114,10 @@ TEST_F(SyncPrefsTest, PreferredTypesNotKeepEverythingSynced) {
}
if (it.Get() == syncable::APPS) {
expected_preferred_types.Put(syncable::APP_NOTIFICATIONS);
+ expected_preferred_types.Put(syncable::APP_SETTINGS);
+ }
+ if (it.Get() == syncable::EXTENSIONS) {
+ expected_preferred_types.Put(syncable::EXTENSION_SETTINGS);
}
sync_prefs.SetPreferredDataTypes(non_passive_types, preferred_types);
EXPECT_TRUE(expected_preferred_types.Equals(