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

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

Issue 2301893002: (Trivial) Remove duplicate assignments of encoded_data_length (Closed)
Patch Set: Created 4 years, 3 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/child/resource_dispatcher.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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 return false; 306 return false;
307 307
308 *defer = did_defer_ = true; 308 *defer = did_defer_ = true;
309 OnDefer(); 309 OnDefer();
310 310
311 NetLogObserver::PopulateResponseInfo(request(), response); 311 NetLogObserver::PopulateResponseInfo(request(), response);
312 response->head.encoded_data_length = request()->GetTotalReceivedBytes(); 312 response->head.encoded_data_length = request()->GetTotalReceivedBytes();
313 reported_transfer_size_ = 0; 313 reported_transfer_size_ = 0;
314 response->head.request_start = request()->creation_time(); 314 response->head.request_start = request()->creation_time();
315 response->head.response_start = TimeTicks::Now(); 315 response->head.response_start = TimeTicks::Now();
316 response->head.encoded_data_length = request()->GetTotalReceivedBytes();
317 // TODO(davidben): Is it necessary to pass the new first party URL for 316 // TODO(davidben): Is it necessary to pass the new first party URL for
318 // cookies? The only case where it can change is top-level navigation requests 317 // cookies? The only case where it can change is top-level navigation requests
319 // and hopefully those will eventually all be owned by the browser. It's 318 // and hopefully those will eventually all be owned by the browser. It's
320 // possible this is still needed while renderer-owned ones exist. 319 // possible this is still needed while renderer-owned ones exist.
321 return info->filter()->Send(new ResourceMsg_ReceivedRedirect( 320 return info->filter()->Send(new ResourceMsg_ReceivedRedirect(
322 GetRequestID(), redirect_info, response->head)); 321 GetRequestID(), redirect_info, response->head));
323 } 322 }
324 323
325 bool AsyncResourceHandler::OnResponseStarted(ResourceResponse* response, 324 bool AsyncResourceHandler::OnResponseStarted(ResourceResponse* response,
326 bool* defer) { 325 bool* defer) {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 } else { 600 } else {
602 UMA_HISTOGRAM_CUSTOM_COUNTS( 601 UMA_HISTOGRAM_CUSTOM_COUNTS(
603 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", 602 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB",
604 elapsed_time, 1, 100000, 100); 603 elapsed_time, 1, 100000, 100);
605 } 604 }
606 605
607 inlining_helper_->RecordHistogram(elapsed_time); 606 inlining_helper_->RecordHistogram(elapsed_time);
608 } 607 }
609 608
610 } // namespace content 609 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/child/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698