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

Unified Diff: headless/public/util/deterministic_http_protocol_handler.cc

Issue 2815003003: Headless (breaking change): A better GenericURLRequestJob::Delegate API (Closed)
Patch Set: Changes for Sami Created 3 years, 8 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 | « headless/BUILD.gn ('k') | headless/public/util/generic_url_request_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/public/util/deterministic_http_protocol_handler.cc
diff --git a/headless/public/util/deterministic_http_protocol_handler.cc b/headless/public/util/deterministic_http_protocol_handler.cc
index 6a186b99cf92735fb52399058fff7f9cd25ce444..dd905b64200b688886e4a46b229c79af9a89de11 100644
--- a/headless/public/util/deterministic_http_protocol_handler.cc
+++ b/headless/public/util/deterministic_http_protocol_handler.cc
@@ -22,27 +22,20 @@ class DeterministicHttpProtocolHandler::NopGenericURLRequestJobDelegate
~NopGenericURLRequestJobDelegate() override {}
// GenericURLRequestJob::Delegate methods:
- bool BlockOrRewriteRequest(
- const GURL& url,
- const std::string& devtools_id,
- const std::string& method,
- const std::string& referrer,
- GenericURLRequestJob::RewriteCallback callback) override {
- return false;
+ void OnPendingRequest(PendingRequest* pending_request) override {
+ pending_request->AllowRequest();
}
- const GenericURLRequestJob::HttpResponse* MaybeMatchResource(
- const GURL& url,
- const std::string& devtools_id,
- const std::string& method,
- const net::HttpRequestHeaders& request_headers) override {
- return nullptr;
+ void OnResourceLoadFailed(const Request* request, net::Error error) override {
}
- void OnResourceLoadComplete(const GURL& final_url,
- const std::string& devtools_id,
- const std::string& mime_type,
- int http_response_code) override {}
+ void OnResourceLoadComplete(
+ const Request* request,
+ const GURL& final_url,
+ int http_response_code,
+ scoped_refptr<net::HttpResponseHeaders> response_headers,
+ const char* body,
+ size_t body_size) override {}
private:
DISALLOW_COPY_AND_ASSIGN(NopGenericURLRequestJobDelegate);
« no previous file with comments | « headless/BUILD.gn ('k') | headless/public/util/generic_url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698