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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2514713002: Send encoded_body_length to renderer when response completed (1/3) (Closed)
Patch Set: fix Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 sync_result_handler.Run(&result); 238 sync_result_handler.Run(&result);
239 } else { 239 } else {
240 // Tell the renderer that this request was disallowed. 240 // Tell the renderer that this request was disallowed.
241 ResourceRequestCompletionStatus request_complete_data; 241 ResourceRequestCompletionStatus request_complete_data;
242 request_complete_data.error_code = net::ERR_ABORTED; 242 request_complete_data.error_code = net::ERR_ABORTED;
243 request_complete_data.was_ignored_by_handler = false; 243 request_complete_data.was_ignored_by_handler = false;
244 request_complete_data.exists_in_cache = false; 244 request_complete_data.exists_in_cache = false;
245 // No security info needed, connection not established. 245 // No security info needed, connection not established.
246 request_complete_data.completion_time = base::TimeTicks(); 246 request_complete_data.completion_time = base::TimeTicks();
247 request_complete_data.encoded_data_length = 0; 247 request_complete_data.encoded_data_length = 0;
248 request_complete_data.encoded_body_length = 0;
248 if (url_loader_client) { 249 if (url_loader_client) {
249 url_loader_client->OnComplete(request_complete_data); 250 url_loader_client->OnComplete(request_complete_data);
250 } else { 251 } else {
251 filter->Send( 252 filter->Send(
252 new ResourceMsg_RequestComplete(request_id, request_complete_data)); 253 new ResourceMsg_RequestComplete(request_id, request_complete_data));
253 } 254 }
254 } 255 }
255 } 256 }
256 257
257 void SetReferrerForRequest(net::URLRequest* request, const Referrer& referrer) { 258 void SetReferrerForRequest(net::URLRequest* request, const Referrer& referrer) {
(...skipping 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after
2800 &throttles); 2801 &throttles);
2801 if (!throttles.empty()) { 2802 if (!throttles.empty()) {
2802 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, 2803 handler.reset(new ThrottlingResourceHandler(std::move(handler), request,
2803 std::move(throttles))); 2804 std::move(throttles)));
2804 } 2805 }
2805 } 2806 }
2806 return handler; 2807 return handler;
2807 } 2808 }
2808 2809
2809 } // namespace content 2810 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698