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

Unified Diff: chrome/common/extensions/extension.cc

Issue 10855190: Disable sync for default apps (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: comments Created 8 years, 4 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/common/extensions/extension.h ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 03bba03247001607407bbad7e3a594fe3ba3d415..a2aa3c53f4739bb8a9065d004473bec9e7a8fe94 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -3776,9 +3776,15 @@ Extension::SyncType Extension::GetSyncType() const {
bool Extension::IsSyncable() const {
// TODO(akalin): Figure out if we need to allow some other types.
- // We want to sync any extensions that are internal and the chrome web store.
- return location() == Extension::INTERNAL ||
- id() == extension_misc::kWebStoreAppId;
+ // Default apps are not synced because otherwise they will pollute profiles
+ // that don't already have them. Specially, if a user doesn't have default
+ // apps, creates a new profile (which get default apps) and then enables sync
+ // for it, then their profile everywhere gets the default apps.
+ bool is_syncable = (location() == Extension::INTERNAL &&
+ !was_installed_by_default());
+ // Sync the chrome web store to maintain its position on the new tab page.
+ is_syncable |= (id() == extension_misc::kWebStoreAppId);
+ return is_syncable;
}
bool Extension::ShouldDisplayInLauncher() const {
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698