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

Unified Diff: extensions/browser/api/test/test_api.h

Issue 2017113002: [Extensions] DCHECK that ExtensionFunctions respond (and only once) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/test_api.h
diff --git a/extensions/browser/api/test/test_api.h b/extensions/browser/api/test/test_api.h
index 44d6e3dc1b497ad59f90a02acd32e690c0197680..f86fea842730ae043e4d4a1f084500449441ce75 100644
--- a/extensions/browser/api/test/test_api.h
+++ b/extensions/browser/api/test/test_api.h
@@ -63,8 +63,9 @@ class TestLogFunction : public TestExtensionFunction {
bool RunSafe() override;
};
-class TestSendMessageFunction : public AsyncExtensionFunction {
+class TestSendMessageFunction : public UIThreadExtensionFunction {
public:
+ TestSendMessageFunction();
DECLARE_EXTENSION_FUNCTION("test.sendMessage", UNKNOWN)
// Sends a reply back to the calling extension. Many extensions don't need
@@ -77,8 +78,13 @@ class TestSendMessageFunction : public AsyncExtensionFunction {
protected:
~TestSendMessageFunction() override;
- // ExtensionFunction:
- bool RunAsync() override;
+ // UIExtensionFunction:
+ ResponseAction Run() override;
+
+ // Whether or not the function is currently waiting for a reply.
+ bool waiting_;
+
+ ResponseValue response_;
};
class TestGetConfigFunction : public TestExtensionFunction {
« no previous file with comments | « extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc ('k') | extensions/browser/api/test/test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698