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

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

Issue 173463: Update of the extension install UI: (Closed)
Patch Set: mpcompelte comments Created 11 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
Index: chrome/browser/extensions/extensions_service.cc
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 03313660ee1fd67c2e76f6ec967688aa7f01ee7d..91a7ce8408bfc0e733c589ff1e7754aae01f9769 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -379,16 +379,15 @@ void ExtensionsService::OnExtensionLoaded(Extension* extension) {
Extension* old = GetExtensionByIdInternal(extension->id(), true, true);
if (old) {
if (extension->version()->CompareTo(*(old->version())) > 0) {
- bool higher_permissions =
- (extension->GetPermissionClass() > old->GetPermissionClass());
+ bool allow_silent_upgrade = Extension::AllowSilentUpgrade(old, extension);
Matt Perry 2009/08/26 21:10:32 80 cols
// To upgrade an extension in place, unload the old one and
// then load the new one.
UnloadExtension(old->id());
old = NULL;
- if (higher_permissions) {
- // Extension was upgraded to a high permission class. Disable it and
+ if (!allow_silent_upgrade) {
+ // Extension has changed permissions significantly. Disable it and
// notify the user.
extension_prefs_->SetExtensionState(extension, Extension::DISABLED);
NotificationService::current()->Notify(
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.cc ('k') | chrome/browser/views/extensions/extension_install_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698