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

Unified Diff: chrome/browser/extensions/extension_sync_bundle.cc

Issue 217063005: Separate SyncData methods into three groups, local, remote, and common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@syncapi
Patch Set: Rebase. Created 6 years, 9 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/extensions/app_sync_bundle.cc ('k') | chrome/browser/history/history_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_sync_bundle.cc
diff --git a/chrome/browser/extensions/extension_sync_bundle.cc b/chrome/browser/extensions/extension_sync_bundle.cc
index 9d91af92cc71df98cfa160aa71a34da7ce1d4ed3..facac2295cb7f596b2f08341f261883489af5a91 100644
--- a/chrome/browser/extensions/extension_sync_bundle.cc
+++ b/chrome/browser/extensions/extension_sync_bundle.cc
@@ -59,12 +59,13 @@ void ExtensionSyncBundle::ProcessDeletion(
syncer::SyncChange ExtensionSyncBundle::CreateSyncChange(
const syncer::SyncData& sync_data) {
- if (HasExtensionId(sync_data.GetTag())) {
+ const syncer::SyncDataLocal sync_data_local(sync_data);
+ if (HasExtensionId(sync_data_local.GetTag())) {
return syncer::SyncChange(FROM_HERE,
syncer::SyncChange::ACTION_UPDATE,
sync_data);
} else {
- AddExtension(sync_data.GetTag());
+ AddExtension(sync_data_local.GetTag());
return syncer::SyncChange(FROM_HERE,
syncer::SyncChange::ACTION_ADD,
sync_data);
« no previous file with comments | « chrome/browser/extensions/app_sync_bundle.cc ('k') | chrome/browser/history/history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698