summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 21:52:10 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 21:52:10 +0000
commit54cdca4fe4814a6fdd4e7deb6ca6681514f50505 (patch)
treea91453d6b2b328362fb8521a1585382c82cedd8f /chrome/common
parent975496c3acddae77c7d8bf0f936242efe6ec9e0a (diff)
downloadchromium_src-54cdca4fe4814a6fdd4e7deb6ca6681514f50505.zip
chromium_src-54cdca4fe4814a6fdd4e7deb6ca6681514f50505.tar.gz
chromium_src-54cdca4fe4814a6fdd4e7deb6ca6681514f50505.tar.bz2
Changed EXTENSION_UNINSTALLED notification to happen after uninstallation.
The important part is that it comes after the EXTENSION_UNLOADED notification is sent. This makes it easier on the listeners, as they can assume that extension notifications other than EXTENSION_UNINSTALLED are sent for currently-installed extensions. BUG=54415 TEST=BackgroundModeManagerTest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=60834 Review URL: http://codereview.chromium.org/3461025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/extensions/extension.cc5
-rw-r--r--chrome/common/extensions/extension.h9
-rw-r--r--chrome/common/notification_type.h7
3 files changed, 16 insertions, 5 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index a236809..375bfa6 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -1958,3 +1958,8 @@ ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest,
ExtensionInfo::~ExtensionInfo() {
}
+
+UninstalledExtensionInfo::UninstalledExtensionInfo(
+ const Extension& extension)
+ : extension_id(extension.id()),
+ extension_api_permissions(extension.api_permissions()) {}
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 79f9156..8e9d2d1 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -610,4 +610,13 @@ struct ExtensionInfo {
DISALLOW_COPY_AND_ASSIGN(ExtensionInfo);
};
+// Struct used for the details of the EXTENSION_UNINSTALLED
+// notification.
+struct UninstalledExtensionInfo {
+ explicit UninstalledExtensionInfo(const Extension& extension);
+
+ std::string extension_id;
+ std::set<std::string> extension_api_permissions;
+};
+
#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
diff --git a/chrome/common/notification_type.h b/chrome/common/notification_type.h
index 541aaa9..d903ffb 100644
--- a/chrome/common/notification_type.h
+++ b/chrome/common/notification_type.h
@@ -797,11 +797,8 @@ class NotificationType {
// details about why the install failed.
EXTENSION_INSTALL_ERROR,
- // Sent when a new extension is being uninstalled. When this notification
- // is sent, the ExtensionsService still is tracking this extension (it has
- // not been unloaded yet). This will be followed by an EXTENSION_UNLOADED
- // or EXTENSION_UNLOADED_DISABLED when the extension is actually unloaded.
- // The details are an Extension and the source is a Profile.
+ // Sent when an extension has been uninstalled. The details are
+ // an UninstalledExtensionInfo struct and the source is a Profile.
EXTENSION_UNINSTALLED,
// Sent when an extension is unloaded. This happens when an extension is