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

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

Issue 2167853003: [DevTools] Always report encodedDataLength in Network.ResponseReceived. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Header sizes in devtools 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 | net/url_request/url_request.h » ('j') | net/url_request/url_request.h » ('J')
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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 waiting_for_upload_progress_ack_ = false; 348 waiting_for_upload_progress_ack_ = false;
349 ReportUploadProgress(); 349 ReportUploadProgress();
350 } 350 }
351 351
352 if (rdh_->delegate()) { 352 if (rdh_->delegate()) {
353 rdh_->delegate()->OnResponseStarted(request(), info->GetContext(), 353 rdh_->delegate()->OnResponseStarted(request(), info->GetContext(),
354 response); 354 response);
355 } 355 }
356 356
357 NetLogObserver::PopulateResponseInfo(request(), response); 357 NetLogObserver::PopulateResponseInfo(request(), response);
358 response->head.encoded_data_length = request()->raw_header_size();
mmenke 2016/07/21 18:10:50 Hrm...I guess you can't use request()->GetTotalRec
allada 2016/07/22 17:19:32 I tried that originally but it was returning the n
358 359
359 const HostZoomMapImpl* host_zoom_map = 360 const HostZoomMapImpl* host_zoom_map =
360 static_cast<const HostZoomMapImpl*>(info->filter()->GetHostZoomMap()); 361 static_cast<const HostZoomMapImpl*>(info->filter()->GetHostZoomMap());
361 362
362 if (info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME && host_zoom_map) { 363 if (info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME && host_zoom_map) {
363 const GURL& request_url = request()->url(); 364 const GURL& request_url = request()->url();
364 int render_process_id = info->GetChildID(); 365 int render_process_id = info->GetChildID();
365 int render_view_id = info->GetRouteID(); 366 int render_view_id = info->GetRouteID();
366 367
367 double zoom_level = host_zoom_map->GetZoomLevelForView( 368 double zoom_level = host_zoom_map->GetZoomLevelForView(
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 } else { 610 } else {
610 UMA_HISTOGRAM_CUSTOM_COUNTS( 611 UMA_HISTOGRAM_CUSTOM_COUNTS(
611 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", 612 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB",
612 elapsed_time, 1, 100000, 100); 613 elapsed_time, 1, 100000, 100);
613 } 614 }
614 615
615 inlining_helper_->RecordHistogram(elapsed_time); 616 inlining_helper_->RecordHistogram(elapsed_time);
616 } 617 }
617 618
618 } // namespace content 619 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | net/url_request/url_request.h » ('j') | net/url_request/url_request.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698