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

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

Issue 7795011: Fixing crash on sync when app becomes extension or vice versa. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « no previous file | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index c5fe8579246e777a0cdf87f1de8d5fc30771b4f0..27128efb4a759a084085e1233dcb213c52d4e903 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1891,6 +1891,13 @@ void ExtensionService::ProcessExtensionSyncData(
const ExtensionSyncData& extension_sync_data,
SyncBundle& bundle) {
const std::string& id = extension_sync_data.id();
+ const Extension* extension = GetInstalledExtension(id);
+
+ // TODO(bolms): we should really handle this better. The particularly bad
+ // case is where an app becomes an extension or vice versa, and we end up with
+ // a zombie extension that won't go away.
+ if (extension && !bundle.filter(*extension))
+ return;
// Handle uninstalls first.
if (extension_sync_data.uninstalled()) {
@@ -1910,7 +1917,6 @@ void ExtensionService::ProcessExtensionSyncData(
}
SetIsIncognitoEnabled(id, extension_sync_data.incognito_enabled());
- const Extension* extension = GetInstalledExtension(id);
if (extension) {
// If the extension is already installed, check if it's outdated.
int result = extension->version()->CompareTo(extension_sync_data.version());
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698