Index: chrome/browser/extensions/pending_extension_manager.cc |
diff --git a/chrome/browser/extensions/pending_extension_manager.cc b/chrome/browser/extensions/pending_extension_manager.cc |
index d4446a95c639f1632d1c6cd5da12d72ef88c1166..c978415f5c2fe734b63bbc410285077ebdecbc0c 100644 |
--- a/chrome/browser/extensions/pending_extension_manager.cc |
+++ b/chrome/browser/extensions/pending_extension_manager.cc |
@@ -74,13 +74,21 @@ void PendingExtensionManager::AddFromExternalUpdateUrl( |
const bool kIsFromSync = false; |
const bool kInstallSilently = true; |
- if (service_.IsExternalExtensionUninstalled(id)) |
- return; |
- |
- if (service_.GetInstalledExtension(id)) { |
- LOG(DFATAL) << "Trying to add extension " << id |
- << " by external update, but it is already installed."; |
- return; |
+ const Extension* extension = service_.GetInstalledExtension(id); |
+ if (extension && |
+ location == Extension::GetHigherPriorityLocation(location, |
+ extension->location())) { |
+ // If the new location has higher priority than the location of an existing |
+ // extension, let the update process overwrite the existing extension. |
+ } else { |
+ if (service_.IsExternalExtensionUninstalled(id)) { |
+ return; |
+ } |
+ if (extension) { |
+ LOG(DFATAL) << "Trying to add extension " << id |
+ << " by external update, but it is already installed."; |
+ return; |
+ } |
} |
AddExtensionImpl(id, update_url, &AlwaysInstall, |