summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_function_test_utils.h
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 22:31:32 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 22:31:32 +0000
commitd8c8749b93af8d5b8b2a761313673539234680ef (patch)
treec545342aa8c464585b6801ba53ec223096b2ff02 /chrome/browser/extensions/extension_function_test_utils.h
parentdebb04d07991d559cdd7d24107e3f4f862015d92 (diff)
downloadchromium_src-d8c8749b93af8d5b8b2a761313673539234680ef.zip
chromium_src-d8c8749b93af8d5b8b2a761313673539234680ef.tar.gz
chromium_src-d8c8749b93af8d5b8b2a761313673539234680ef.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. (This is re-landing http://codereview.chromium.org/8423069/ which had a compile error on the cros_tegra2 bot) BUG=102579 TEST=See bug TBR=aa@chromium.org Review URL: http://codereview.chromium.org/8488012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_function_test_utils.h')
-rw-r--r--chrome/browser/extensions/extension_function_test_utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_function_test_utils.h b/chrome/browser/extensions/extension_function_test_utils.h
index 3b24b5d..ef005a4 100644
--- a/chrome/browser/extensions/extension_function_test_utils.h
+++ b/chrome/browser/extensions/extension_function_test_utils.h
@@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h"
+class AsyncExtensionFunction;
class Browser;
class Extension;
class UIThreadExtensionFunction;
@@ -84,6 +85,13 @@ void RunFunction(UIThreadExtensionFunction* function,
Browser* browser,
RunFunctionFlags flags);
+// Similar to RunFunction, but doesn't return until |function| calls
+// SendResponse. Returns the value |function| passed to SendResponse.
+bool RunAsyncFunction(AsyncExtensionFunction* function,
+ const std::string& args,
+ Browser* browser,
+ RunFunctionFlags flags);
+
} // namespace extension_function_test_utils
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_TEST_UTILS_H_