summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 22:53:47 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 22:53:47 +0000
commit86693068111d56f16fd2ceee6bb87ac72030e371 (patch)
treeeaab33bc7911a31d022781ec35b7fe1efbfffadc /chrome/common/extensions
parentf1aadb738b716d2e32392023b9eb7b75eac59f07 (diff)
downloadchromium_src-86693068111d56f16fd2ceee6bb87ac72030e371.zip
chromium_src-86693068111d56f16fd2ceee6bb87ac72030e371.tar.gz
chromium_src-86693068111d56f16fd2ceee6bb87ac72030e371.tar.bz2
Show the extension install UI when the user clicks Reenable for a disabled-on-upgrade extension.
Also fix a couple misc bugs with disabled extensions: - Fix a crash when trying to reenable an uninstalled disabled extension. - Fix a bug where upgrading a disabled extension would reenable it. BUG=12140 TEST=no Review URL: http://codereview.chromium.org/172006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions')
-rw-r--r--chrome/common/extensions/extension.cc8
-rw-r--r--chrome/common/extensions/extension.h5
2 files changed, 13 insertions, 0 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index ebb8d13..08b77bb 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -1003,3 +1003,11 @@ void Extension::SetBackgroundPageReady() {
Source<Extension>(this),
NotificationService::NoDetails());
}
+
+FilePath Extension::GetIconPath(Icons icon) {
+ std::map<int, std::string>::const_iterator iter =
+ icons_.find(Extension::EXTENSION_ICON_LARGE);
+ if (iter == icons_.end())
+ return FilePath();
+ return GetResourcePath(iter->second);
+}
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index b9761d0..afd62c1 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -223,8 +223,13 @@ class Extension {
// the browser might load (like themes and page action icons).
std::set<FilePath> GetBrowserImages();
+ // Calculates and returns the permission class this extension is in.
PermissionClass GetPermissionClass();
+ // Returns an absolute path to the given icon inside of the extension. Returns
+ // an empty FilePath if the extension does not have that icon.
+ FilePath GetIconPath(Icons icon);
+
// Runtime data:
// Put dynamic data about the state of a running extension below.