| Index: chrome/browser/extensions/extension_service.cc
|
| diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
|
| index d8b7f5f35c5ca7b80afc638c826921d1e09cfb5e..3391dca124f217d3ed8273876e7b3141da3064f1 100644
|
| --- a/chrome/browser/extensions/extension_service.cc
|
| +++ b/chrome/browser/extensions/extension_service.cc
|
| @@ -1428,6 +1428,16 @@ void ExtensionService::LoadInstalledExtension(const ExtensionInfo& info,
|
| error = errors::kManifestUnreadable;
|
| }
|
|
|
| + // Once installed, non-unpacked extensions cannot change their IDs (e.g., by
|
| + // updating the 'key' field in their manifest).
|
| + if (extension &&
|
| + extension->location() != Extension::LOAD &&
|
| + info.extension_id != extension->id()) {
|
| + error = errors::kCannotChangeExtensionID;
|
| + extension = NULL;
|
| + UserMetrics::RecordAction(UserMetricsAction("Extensions.IDChangedError"));
|
| + }
|
| +
|
| if (!extension) {
|
| ReportExtensionLoadError(info.extension_path,
|
| error,
|
|
|