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

Unified Diff: chrome/browser/extensions/extension_util.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_util.h ('k') | chrome/common/extensions/sync_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_util.cc
diff --git a/chrome/browser/extensions/extension_util.cc b/chrome/browser/extensions/extension_util.cc
index dd28913209f58be2934b1f20c15c4b18276edda1..45dc7408cc3cda2f8d46ea09561abce570b7bf7a 100644
--- a/chrome/browser/extensions/extension_util.cc
+++ b/chrome/browser/extensions/extension_util.cc
@@ -180,9 +180,16 @@ bool IsAppLaunchableWithoutEnabling(const std::string& extension_id,
extension_id, ExtensionRegistry::ENABLED) != NULL;
}
+bool ShouldSyncExtension(const Extension* extension,
+ content::BrowserContext* context) {
+ return sync_helper::IsSyncableExtension(extension) &&
+ !ExtensionPrefs::Get(context)->DoNotSync(extension->id());
+}
+
bool ShouldSyncApp(const Extension* app, content::BrowserContext* context) {
return sync_helper::IsSyncableApp(app) &&
- !util::IsEphemeralApp(app->id(), context);
+ !util::IsEphemeralApp(app->id(), context) &&
+ !ExtensionPrefs::Get(context)->DoNotSync(app->id());
}
bool IsExtensionIdle(const std::string& extension_id,
« no previous file with comments | « chrome/browser/extensions/extension_util.h ('k') | chrome/common/extensions/sync_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698