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

Unified Diff: chrome/browser/extensions/app_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: Remove AsLocal and AsRemote methods from SyncData. 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
Index: chrome/browser/extensions/app_sync_bundle.cc
diff --git a/chrome/browser/extensions/app_sync_bundle.cc b/chrome/browser/extensions/app_sync_bundle.cc
index 061d5842fa04b1d883d0a7f0e02fffa197716732..08c4c1d523b5fed532b027f5ef2e78aa9c68cfff 100644
--- a/chrome/browser/extensions/app_sync_bundle.cc
+++ b/chrome/browser/extensions/app_sync_bundle.cc
@@ -11,6 +11,7 @@
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
#include "sync/api/sync_change_processor.h"
+#include "sync/api/sync_data.h"
#include "sync/api/sync_error_factory.h"
namespace extensions {
@@ -59,12 +60,12 @@ void AppSyncBundle::ProcessDeletion(std::string extension_id,
syncer::SyncChange AppSyncBundle::CreateSyncChange(
const syncer::SyncData& sync_data) {
- if (HasExtensionId(sync_data.GetTag())) {
+ if (HasExtensionId(syncer::SyncDataLocal(sync_data).GetTag())) {
return syncer::SyncChange(FROM_HERE,
syncer::SyncChange::ACTION_UPDATE,
sync_data);
} else {
- AddApp(sync_data.GetTag());
+ AddApp(syncer::SyncDataLocal(sync_data).GetTag());
return syncer::SyncChange(FROM_HERE,
syncer::SyncChange::ACTION_ADD,
sync_data);

Powered by Google App Engine
This is Rietveld 408576698