Chromium Code Reviews| 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..a4057c04f934a2c69aa7b6a37a08bc6d35cca1e5 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,17 @@ 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 |
| + // 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( |
|
lazyboy
2016/08/03 23:10:37
this can/should be private:
Devlin
2016/08/04 16:32:42
Done.
|
| 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 +538,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 |