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

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

Issue 323843003: Add a do_not_sync pref to ExtensionPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for comments in #2 Created 6 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/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_sync_service.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 facac2295cb7f596b2f08341f261883489af5a91..2333ffa6b94f430147f535194a32077f68168b2f 100644
--- a/chrome/browser/extensions/extension_sync_bundle.cc
+++ b/chrome/browser/extensions/extension_sync_bundle.cc
@@ -6,6 +6,8 @@
#include "base/location.h"
#include "chrome/browser/extensions/extension_sync_service.h"
+#include "chrome/browser/extensions/extension_util.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/sync_helper.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
@@ -142,13 +144,15 @@ std::vector<ExtensionSyncData> ExtensionSyncBundle::GetPendingData() const {
void ExtensionSyncBundle::GetExtensionSyncDataListHelper(
const ExtensionSet& extensions,
std::vector<ExtensionSyncData>* sync_data_list) const {
+ Profile* profile = extension_sync_service_->profile();
+
for (ExtensionSet::const_iterator it = extensions.begin();
it != extensions.end(); ++it) {
const Extension& extension = *it->get();
// If we have pending extension data for this extension, then this
// version is out of date. We'll sync back the version we got from
// sync.
- if (IsSyncing() && sync_helper::IsSyncableExtension(&extension) &&
+ if (IsSyncing() && util::ShouldSyncExtension(&extension, profile) &&
!HasPendingExtensionId(extension.id())) {
sync_data_list->push_back(
extension_sync_service_->GetExtensionSyncData(extension));
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698