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

Side by Side Diff: headless/public/util/generic_url_request_job.cc

Issue 2750513002: Headless: Pass devtools request id to the URLFetcher (Closed)
Patch Set: Remove underscores Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | headless/public/util/generic_url_request_job_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "headless/public/util/generic_url_request_job.h" 5 #include "headless/public/util/generic_url_request_job.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // The resource may have been supplied in the request. 128 // The resource may have been supplied in the request.
129 const HttpResponse* matched_resource = delegate_->MaybeMatchResource( 129 const HttpResponse* matched_resource = delegate_->MaybeMatchResource(
130 rewritten_url, devtools_request_id_, method, extra_request_headers_); 130 rewritten_url, devtools_request_id_, method, extra_request_headers_);
131 131
132 if (matched_resource) { 132 if (matched_resource) {
133 OnFetchCompleteExtractHeaders( 133 OnFetchCompleteExtractHeaders(
134 matched_resource->final_url, matched_resource->http_response_code, 134 matched_resource->final_url, matched_resource->http_response_code,
135 matched_resource->response_data, matched_resource->response_data_size); 135 matched_resource->response_data, matched_resource->response_data_size);
136 } else { 136 } else {
137 url_fetcher_->StartFetch(rewritten_url, method, extra_request_headers_, 137 url_fetcher_->StartFetch(rewritten_url, method, extra_request_headers_,
138 this); 138 devtools_request_id_, this);
139 } 139 }
140 } 140 }
141 141
142 void GenericURLRequestJob::OnFetchStartError(net::Error error) { 142 void GenericURLRequestJob::OnFetchStartError(net::Error error) {
143 DispatchStartError(error); 143 DispatchStartError(error);
144 } 144 }
145 145
146 void GenericURLRequestJob::OnFetchComplete( 146 void GenericURLRequestJob::OnFetchComplete(
147 const GURL& final_url, 147 const GURL& final_url,
148 int http_response_code, 148 int http_response_code,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 return response_headers_->GetCharset(charset); 197 return response_headers_->GetCharset(charset);
198 } 198 }
199 199
200 void GenericURLRequestJob::GetLoadTimingInfo( 200 void GenericURLRequestJob::GetLoadTimingInfo(
201 net::LoadTimingInfo* load_timing_info) const { 201 net::LoadTimingInfo* load_timing_info) const {
202 // TODO(alexclarke): Investigate setting the other members too where possible. 202 // TODO(alexclarke): Investigate setting the other members too where possible.
203 load_timing_info->receive_headers_end = response_time_; 203 load_timing_info->receive_headers_end = response_time_;
204 } 204 }
205 205
206 } // namespace headless 206 } // namespace headless
OLDNEW
« no previous file with comments | « no previous file | headless/public/util/generic_url_request_job_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698