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

Unified Diff: extensions/browser/api/web_request/web_request_api.h

Issue 2204363002: [Extensions] Remove SyncIOThreadExtensionFunction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lazyboy@'s Created 4 years, 4 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
« no previous file with comments | « no previous file | extensions/browser/api/web_request/web_request_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/web_request/web_request_api.h
diff --git a/extensions/browser/api/web_request/web_request_api.h b/extensions/browser/api/web_request/web_request_api.h
index ff9def33d20075e929291ca957a89eb9629c757f..de5784b3c739d42e45eb2a93ecf9062cab1bfd05 100644
--- a/extensions/browser/api/web_request/web_request_api.h
+++ b/extensions/browser/api/web_request/web_request_api.h
@@ -476,7 +476,7 @@ class ExtensionWebRequestEventRouter
DISALLOW_COPY_AND_ASSIGN(ExtensionWebRequestEventRouter);
};
-class WebRequestInternalFunction : public SyncIOThreadExtensionFunction {
+class WebRequestInternalFunction : public IOThreadExtensionFunction {
public:
WebRequestInternalFunction() {}
@@ -498,7 +498,7 @@ class WebRequestInternalAddEventListenerFunction
~WebRequestInternalAddEventListenerFunction() override {}
// ExtensionFunction:
- bool RunSync() override;
+ ResponseAction Run() override;
};
class WebRequestInternalEventHandledFunction
@@ -510,19 +510,18 @@ class WebRequestInternalEventHandledFunction
protected:
~WebRequestInternalEventHandledFunction() override {}
- // Unblocks the network request and sets |error_| such that the developer
- // console will show the respective error message. Use this function to handle
- // incorrect requests from the extension that cannot be detected by the schema
+ private:
+ // Unblocks the network request. Use this function when handling incorrect
+ // requests from the extension that cannot be detected by the schema
// validator.
- void RespondWithError(
+ void OnError(
const std::string& event_name,
const std::string& sub_event_name,
uint64_t request_id,
- std::unique_ptr<ExtensionWebRequestEventRouter::EventResponse> response,
- const std::string& error);
+ std::unique_ptr<ExtensionWebRequestEventRouter::EventResponse> response);
// ExtensionFunction:
- bool RunSync() override;
+ ResponseAction Run() override;
};
class WebRequestHandlerBehaviorChangedFunction
@@ -540,7 +539,7 @@ class WebRequestHandlerBehaviorChangedFunction
// Handle quota exceeded gracefully: Only warn the user but still execute the
// function.
void OnQuotaExceeded(const std::string& error) override;
- bool RunSync() override;
+ ResponseAction Run() override;
};
} // namespace extensions
« no previous file with comments | « no previous file | extensions/browser/api/web_request/web_request_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698