summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authoralbertb@chromium.org <albertb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 20:28:46 +0000
committeralbertb@chromium.org <albertb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 20:28:46 +0000
commit9b55ffc6446732df180a70e0898e12103fc6b4b2 (patch)
treeacf2c465c3583089db3864a7232e814c811d13f4 /chrome/browser/sync
parent92e09378ac701637d3057a9d1200c9d7c3b6d04f (diff)
downloadchromium_src-9b55ffc6446732df180a70e0898e12103fc6b4b2.zip
chromium_src-9b55ffc6446732df180a70e0898e12103fc6b4b2.tar.gz
chromium_src-9b55ffc6446732df180a70e0898e12103fc6b4b2.tar.bz2
sync: Add PriorityPreference protobuf and supporting code.
BUG=168648 Review URL: https://chromiumcodereview.appspot.com/11734009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175874 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/glue/model_association_manager.cc1
-rw-r--r--chrome/browser/sync/profile_sync_service.cc2
-rw-r--r--chrome/browser/sync/test_profile_sync_service.cc9
-rw-r--r--chrome/browser/sync/user_selectable_sync_type.h1
4 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/sync/glue/model_association_manager.cc b/chrome/browser/sync/glue/model_association_manager.cc
index 15d8365..7ce9a2a 100644
--- a/chrome/browser/sync/glue/model_association_manager.cc
+++ b/chrome/browser/sync/glue/model_association_manager.cc
@@ -30,6 +30,7 @@ static const syncer::ModelType kStartOrder[] = {
syncer::EXPERIMENTS, // Listed for completeness.
syncer::BOOKMARKS, // UI thread datatypes.
syncer::PREFERENCES,
+ syncer::PRIORITY_PREFERENCES,
syncer::EXTENSIONS,
syncer::APPS,
syncer::THEMES,
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index aabef52..7296d00 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1308,7 +1308,7 @@ void ProfileSyncService::UpdateSelectedTypesHistogram(
browser_sync::user_selectable_type::TYPED_URLS
};
- COMPILE_ASSERT(21 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram);
+ COMPILE_ASSERT(22 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram);
COMPILE_ASSERT(arraysize(model_types) ==
browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT,
UpdateCustomConfigHistogram);
diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc
index 978b7ef..4a15312 100644
--- a/chrome/browser/sync/test_profile_sync_service.cc
+++ b/chrome/browser/sync/test_profile_sync_service.cc
@@ -26,9 +26,10 @@ using syncer::sessions::SyncSessionSnapshot;
using syncer::sessions::SyncSourceInfo;
using syncer::UserShare;
using syncer::syncable::Directory;
-using syncer::NIGORI;
using syncer::DEVICE_INFO;
using syncer::EXPERIMENTS;
+using syncer::NIGORI;
+using syncer::PRIORITY_PREFERENCES;
namespace browser_sync {
@@ -136,7 +137,7 @@ void SyncBackendHostForProfileSyncTest
if (!directory->InitialSyncEndedForType(NIGORI)) {
syncer::TestUserShare::CreateRoot(NIGORI, user_share);
- // A side effect of adding the NIGORI mode (normally done by the
+ // A side effect of adding the NIGORI node (normally done by the
// syncer) is a decryption attempt, which will fail the first time.
}
@@ -148,6 +149,10 @@ void SyncBackendHostForProfileSyncTest
syncer::TestUserShare::CreateRoot(EXPERIMENTS, user_share);
}
+ if (!directory->InitialSyncEndedForType(PRIORITY_PREFERENCES)) {
+ syncer::TestUserShare::CreateRoot(PRIORITY_PREFERENCES, user_share);
+ }
+
restored_types = syncer::ModelTypeSet::All();
}
diff --git a/chrome/browser/sync/user_selectable_sync_type.h b/chrome/browser/sync/user_selectable_sync_type.h
index ee18c02..a9785f9 100644
--- a/chrome/browser/sync/user_selectable_sync_type.h
+++ b/chrome/browser/sync/user_selectable_sync_type.h
@@ -44,6 +44,7 @@ enum UserSelectableSyncType {
// APP_NOTIFICATIONS,
// DEVICE_INFO,
// EXPERIMENTS,
+ // PRIORITY_PREFERENCES,
// Number of sync datatypes exposed to the user via checboxes in the UI.
SELECTABLE_DATATYPE_COUNT = 10,