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

Unified Diff: chrome/browser/sync/syncable/model_type.cc

Issue 2749005: Added extensions sync-related constants, switches, and clauses. (Closed)
Patch Set: Changed comment to be ocnsistent Created 10 years, 6 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 | « chrome/browser/sync/syncable/model_type.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/syncable/model_type.cc
diff --git a/chrome/browser/sync/syncable/model_type.cc b/chrome/browser/sync/syncable/model_type.cc
index dd3af20a890b665c7f3584f79217cca951f3e155..48780d0549d28dc2c04a11df0a179ddf3caa7542 100644
--- a/chrome/browser/sync/syncable/model_type.cc
+++ b/chrome/browser/sync/syncable/model_type.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/sync/engine/syncproto.h"
#include "chrome/browser/sync/protocol/autofill_specifics.pb.h"
#include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
+#include "chrome/browser/sync/protocol/extension_specifics.pb.h"
#include "chrome/browser/sync/protocol/password_specifics.pb.h"
#include "chrome/browser/sync/protocol/preference_specifics.pb.h"
#include "chrome/browser/sync/protocol/sync.pb.h"
@@ -36,6 +37,9 @@ void AddDefaultExtensionValue(syncable::ModelType datatype,
case TYPED_URLS:
specifics->MutableExtension(sync_pb::typed_url);
break;
+ case EXTENSIONS:
+ specifics->MutableExtension(sync_pb::extension);
+ break;
default:
NOTREACHED() << "No known extension for model type.";
}
@@ -91,6 +95,9 @@ ModelType GetModelTypeFromSpecifics(const sync_pb::EntitySpecifics& specifics) {
if (specifics.HasExtension(sync_pb::typed_url))
return TYPED_URLS;
+ if (specifics.HasExtension(sync_pb::extension))
+ return EXTENSIONS;
+
return UNSPECIFIED;
}
« no previous file with comments | « chrome/browser/sync/syncable/model_type.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698