Chromium Code Reviews| 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..7af3d58a2252f75e60fd69f4864e760d571c2093 100644 |
| --- a/chrome/browser/extensions/extension_service.cc |
| +++ b/chrome/browser/extensions/extension_service.cc |
| @@ -1428,6 +1428,15 @@ 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; |
|
asargent_no_longer_on_chrome
2011/09/26 22:08:04
It might be good to include a uma histogram here,
jstritar
2011/09/26 22:11:03
Agreed. Do you think we should add a one off histo
|
| + } |
| + |
| if (!extension) { |
| ReportExtensionLoadError(info.extension_path, |
| error, |