diff options
author | dennisjeffrey@google.com <dennisjeffrey@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-04 20:11:54 +0000 |
---|---|---|
committer | dennisjeffrey@google.com <dennisjeffrey@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-04 20:11:54 +0000 |
commit | ae6cb3026ab95305fe49d512a03718792db9e9ab (patch) | |
tree | ebe3bae469620b26b4b72ce0ecd679c2c418d205 | |
parent | 112a08d3e3ad793906ed11ea3916842ae5132fb3 (diff) | |
download | chromium_src-ae6cb3026ab95305fe49d512a03718792db9e9ab.zip chromium_src-ae6cb3026ab95305fe49d512a03718792db9e9ab.tar.gz chromium_src-ae6cb3026ab95305fe49d512a03718792db9e9ab.tar.bz2 |
New notification when an extension install is skipped due to being disallowed.
BUG=77797
TEST=None.
Review URL: http://codereview.chromium.org/6775001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80361 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/extensions/extension_service.cc | 8 | ||||
-rw-r--r-- | content/common/notification_type.h | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc index f5e8c7e..03b1fda 100644 --- a/chrome/browser/extensions/extension_service.cc +++ b/chrome/browser/extensions/extension_service.cc @@ -1486,10 +1486,16 @@ void ExtensionService::OnExtensionInstalled(const Extension* extension) { if (!pending_extension_info.ShouldAllowInstall(*extension)) { LOG(WARNING) - << "should_install_extension() returned false for " + << "ShouldAllowInstall() returned false for " << extension->id() << " of type " << extension->GetType() << " and update URL " << extension->update_url().spec() << "; not installing"; + + NotificationService::current()->Notify( + NotificationType::EXTENSION_INSTALL_NOT_ALLOWED, + Source<Profile>(profile_), + Details<const Extension>(extension)); + // Delete the extension directory since we're not going to // load it. BrowserThread::PostTask( diff --git a/content/common/notification_type.h b/content/common/notification_type.h index 9e86608..9593573 100644 --- a/content/common/notification_type.h +++ b/content/common/notification_type.h @@ -886,6 +886,11 @@ class NotificationType { // details about why the install failed. EXTENSION_INSTALL_ERROR, + // Sent when an extension install is not allowed, as indicated by + // PendingExtensionInfo::ShouldAllowInstall. The details are an Extension, + // and the source is a Profile. + EXTENSION_INSTALL_NOT_ALLOWED, + // Sent when an extension has been uninstalled. The details are // an UninstalledExtensionInfo struct and the source is a Profile. EXTENSION_UNINSTALLED, |