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

Unified Diff: sync/syncable/model_type.cc

Issue 12286007: Revert "Revert 182527" ([Sync] Make SESSIONS an implicit type) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/protocol/sync.proto ('k') | sync/syncable/nigori_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/model_type.cc
diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc
index ba7a7f01360610ebfa297edfcab50708d052b518..99cf1e943efc71a92da8bfc22418669b1df46f11 100644
--- a/sync/syncable/model_type.cc
+++ b/sync/syncable/model_type.cc
@@ -329,15 +329,17 @@ ModelTypeSet UserTypes() {
ModelTypeSet UserSelectableTypes() {
ModelTypeSet set;
- set.Put(APPS);
- set.Put(AUTOFILL);
+ // Although the order doesn't technically matter here, it's clearer to keep
+ // these in the same order as their definition in the ModelType enum.
set.Put(BOOKMARKS);
- set.Put(EXTENSIONS);
+ set.Put(PREFERENCES);;
set.Put(PASSWORDS);
- set.Put(PREFERENCES);
- set.Put(SESSIONS);
+ set.Put(AUTOFILL);
set.Put(THEMES);
set.Put(TYPED_URLS);
+ set.Put(EXTENSIONS);
+ set.Put(APPS);
+ set.Put(PROXY_TABS);
return set;
}
@@ -375,7 +377,7 @@ ModelTypeSet ControlTypes() {
ModelTypeSet ProxyTypes() {
ModelTypeSet set;
- // TODO(zea): add a TABS type here.
+ set.Put(PROXY_TABS);
return set;
}
@@ -438,6 +440,8 @@ const char* ModelTypeToString(ModelType model_type) {
return "Favicon Images";
case FAVICON_TRACKING:
return "Favicon Tracking";
+ case PROXY_TABS:
+ return "Tabs";
default:
break;
}
@@ -519,6 +523,8 @@ ModelType ModelTypeFromString(const std::string& model_type_string) {
return FAVICON_IMAGES;
else if (model_type_string == "Favicon Tracking")
return FAVICON_TRACKING;
+ else if (model_type_string == "Tabs")
+ return PROXY_TABS;
else
NOTREACHED() << "No known model type corresponding to "
<< model_type_string << ".";
@@ -605,6 +611,8 @@ std::string ModelTypeToRootTag(ModelType type) {
return "google_chrome_favicon_images";
case FAVICON_TRACKING:
return "google_chrome_favicon_tracking";
+ case PROXY_TABS:
+ return std::string();
default:
break;
}
« no previous file with comments | « sync/protocol/sync.proto ('k') | sync/syncable/nigori_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698