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

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

Issue 2158073002: Revert of [DevTools] Always report encodedDataLength in Network.ResponseReceived. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | content/browser/loader/netlog_observer.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 (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 #include "content/browser/loader/async_resource_handler.h" 5 #include "content/browser/loader/async_resource_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 *defer = did_defer_ = true; 297 *defer = did_defer_ = true;
298 OnDefer(); 298 OnDefer();
299 299
300 if (rdh_->delegate()) { 300 if (rdh_->delegate()) {
301 rdh_->delegate()->OnRequestRedirected( 301 rdh_->delegate()->OnRequestRedirected(
302 redirect_info.new_url, request(), info->GetContext(), response); 302 redirect_info.new_url, request(), info->GetContext(), response);
303 } 303 }
304 304
305 NetLogObserver::PopulateResponseInfo(request(), response); 305 NetLogObserver::PopulateResponseInfo(request(), response);
306 response->head.encoded_data_length = request()->GetTotalReceivedBytes();
306 reported_transfer_size_ = 0; 307 reported_transfer_size_ = 0;
307 response->head.request_start = request()->creation_time(); 308 response->head.request_start = request()->creation_time();
308 response->head.response_start = TimeTicks::Now(); 309 response->head.response_start = TimeTicks::Now();
309 // TODO(davidben): Is it necessary to pass the new first party URL for 310 // TODO(davidben): Is it necessary to pass the new first party URL for
310 // cookies? The only case where it can change is top-level navigation requests 311 // cookies? The only case where it can change is top-level navigation requests
311 // and hopefully those will eventually all be owned by the browser. It's 312 // and hopefully those will eventually all be owned by the browser. It's
312 // possible this is still needed while renderer-owned ones exist. 313 // possible this is still needed while renderer-owned ones exist.
313 return info->filter()->Send(new ResourceMsg_ReceivedRedirect( 314 return info->filter()->Send(new ResourceMsg_ReceivedRedirect(
314 GetRequestID(), redirect_info, response->head)); 315 GetRequestID(), redirect_info, response->head));
315 } 316 }
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 } else { 602 } else {
602 UMA_HISTOGRAM_CUSTOM_COUNTS( 603 UMA_HISTOGRAM_CUSTOM_COUNTS(
603 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", 604 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB",
604 elapsed_time, 1, 100000, 100); 605 elapsed_time, 1, 100000, 100);
605 } 606 }
606 607
607 inlining_helper_->RecordHistogram(elapsed_time); 608 inlining_helper_->RecordHistogram(elapsed_time);
608 } 609 }
609 610
610 } // namespace content 611 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/netlog_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698