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

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

Issue 1240573012: Extension syncing: Introduce a NeedsSync pref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext_sync_uninstall
Patch Set: Created 5 years, 5 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/sync_bundle.cc
diff --git a/chrome/browser/extensions/sync_bundle.cc b/chrome/browser/extensions/sync_bundle.cc
index 4887b0a58183043a58921c6718562cc31f53c52b..edd2f92b5a533113130d0e7d73ae0ec1617b6511 100644
--- a/chrome/browser/extensions/sync_bundle.cc
+++ b/chrome/browser/extensions/sync_bundle.cc
@@ -47,13 +47,6 @@ bool SyncBundle::HasExtensionId(const std::string& id) const {
return synced_extensions_.find(id) != synced_extensions_.end();
}
-bool SyncBundle::ShouldIncludeInLocalSyncDataList(
- const Extension& extension) const {
- // If there is pending data for this extension, then this version is out of
- // date. We'll sync back the version we got from sync.
- return IsSyncing() && !HasPendingExtensionId(extension.id());
-}
-
void SyncBundle::PushSyncDataList(
const syncer::SyncDataList& sync_data_list) {
syncer::SyncChangeList sync_change_list;
@@ -78,13 +71,13 @@ void SyncBundle::PushSyncDeletion(const std::string& extension_id,
sync_data)));
}
-void SyncBundle::PushSyncChangeIfNeeded(const Extension& extension) {
+void SyncBundle::PushSyncChange(const std::string& extension_id,
+ const syncer::SyncData& sync_data) {
syncer::SyncChangeList sync_change_list(
1,
- CreateSyncChange(extension.id(),
- sync_service_->CreateSyncData(extension).GetSyncData()));
+ CreateSyncChange(extension_id, sync_data));
PushSyncChanges(sync_change_list);
- MarkPendingExtensionSynced(extension.id());
+ MarkPendingExtensionSynced(extension_id);
}
void SyncBundle::ApplySyncChange(const syncer::SyncChange& sync_change) {

Powered by Google App Engine
This is Rietveld 408576698