Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2775)

Unified Diff: extensions/browser/api_test_utils.cc

Issue 1169223002: [Extensions] Clean up the handling of ExtensionHostMsg_Request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api_test_utils.cc
diff --git a/extensions/browser/api_test_utils.cc b/extensions/browser/api_test_utils.cc
index 4affb86297c6fe120321cce58657c41fbd0ef710..587f8e298098bc6c8a521a82ad6882d1f7df9ccb 100644
--- a/extensions/browser/api_test_utils.cc
+++ b/extensions/browser/api_test_utils.cc
@@ -19,17 +19,6 @@ using extensions::ExtensionFunctionDispatcher;
namespace {
-class TestFunctionDispatcherDelegate
- : public ExtensionFunctionDispatcher::Delegate {
- public:
- TestFunctionDispatcherDelegate() {}
- ~TestFunctionDispatcherDelegate() override {}
-
- // NULL implementation.
- private:
- DISALLOW_COPY_AND_ASSIGN(TestFunctionDispatcherDelegate);
-};
-
scoped_ptr<base::Value> ParseJSON(const std::string& data) {
return base::JSONReader::Read(data);
}
@@ -185,9 +174,8 @@ base::Value* RunFunctionAndReturnSingleResult(
const std::string& args,
content::BrowserContext* context,
RunFunctionFlags flags) {
- TestFunctionDispatcherDelegate delegate;
scoped_ptr<ExtensionFunctionDispatcher> dispatcher(
- new ExtensionFunctionDispatcher(context, &delegate));
+ new ExtensionFunctionDispatcher(context));
return RunFunctionWithDelegateAndReturnSingleResult(
function, args, context, dispatcher.Pass(), flags);
@@ -203,9 +191,8 @@ std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
const std::string& args,
content::BrowserContext* context,
RunFunctionFlags flags) {
- TestFunctionDispatcherDelegate delegate;
scoped_ptr<ExtensionFunctionDispatcher> dispatcher(
- new ExtensionFunctionDispatcher(context, &delegate));
+ new ExtensionFunctionDispatcher(context));
scoped_refptr<ExtensionFunction> function_owner(function);
// Without a callback the function will not generate a result.
function->set_has_callback(true);
@@ -217,9 +204,8 @@ std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
bool RunFunction(UIThreadExtensionFunction* function,
const std::string& args,
content::BrowserContext* context) {
- TestFunctionDispatcherDelegate delegate;
scoped_ptr<ExtensionFunctionDispatcher> dispatcher(
- new ExtensionFunctionDispatcher(context, &delegate));
+ new ExtensionFunctionDispatcher(context));
return RunFunction(function, args, context, dispatcher.Pass(), NONE);
}

Powered by Google App Engine
This is Rietveld 408576698