diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 06:49:10 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 06:49:10 +0000 |
commit | fe0eca5c30281ae58cef01593f0e4aab7fd560f2 (patch) | |
tree | 5534b3c82eb38ad680180a3de46761084c8afffc /chrome/browser/extensions/extension_function.cc | |
parent | 8b700ec91c40bcc8031e48bd7d82c4b5024733f7 (diff) | |
download | chromium_src-fe0eca5c30281ae58cef01593f0e4aab7fd560f2.zip chromium_src-fe0eca5c30281ae58cef01593f0e4aab7fd560f2.tar.gz chromium_src-fe0eca5c30281ae58cef01593f0e4aab7fd560f2.tar.bz2 |
Fix for management API related to escalated permissions disabled extensions
The general approach is to require user gesture and put up the confirmation UI if an extension wants to re-enable a disabled-due-to-permissions-escalation extension.
Also added some new infrastructure for making this easier to test.
BUG=102579
TEST=See bug
Review URL: http://codereview.chromium.org/8423069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110264 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_function.cc')
-rw-r--r-- | chrome/browser/extensions/extension_function.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc index 72728aa..c4a502f 100644 --- a/chrome/browser/extensions/extension_function.cc +++ b/chrome/browser/extensions/extension_function.cc @@ -187,7 +187,14 @@ void IOThreadExtensionFunction::SendResponse(bool success) { ipc_sender(), routing_id_, success); } -AsyncExtensionFunction::AsyncExtensionFunction() { +AsyncExtensionFunction::AsyncExtensionFunction() : delegate_(NULL) { +} + +void AsyncExtensionFunction::SendResponse(bool success) { + if (delegate_) + delegate_->OnSendResponse(this, success); + else + UIThreadExtensionFunction::SendResponse(success); } AsyncExtensionFunction::~AsyncExtensionFunction() { |