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

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

Issue 2164113002: Remove ResourceHandler::OnBeforeNetworkStart (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Oops 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
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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 ReportUploadProgress(); 403 ReportUploadProgress();
404 progress_timer_.Start( 404 progress_timer_.Start(
405 FROM_HERE, 405 FROM_HERE,
406 base::TimeDelta::FromMilliseconds(kUploadProgressIntervalMsec), 406 base::TimeDelta::FromMilliseconds(kUploadProgressIntervalMsec),
407 this, 407 this,
408 &AsyncResourceHandler::ReportUploadProgress); 408 &AsyncResourceHandler::ReportUploadProgress);
409 } 409 }
410 return true; 410 return true;
411 } 411 }
412 412
413 bool AsyncResourceHandler::OnBeforeNetworkStart(const GURL& url, bool* defer) {
414 return true;
415 }
416
417 bool AsyncResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf, 413 bool AsyncResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf,
418 int* buf_size, 414 int* buf_size,
419 int min_size) { 415 int min_size) {
420 DCHECK_EQ(-1, min_size); 416 DCHECK_EQ(-1, min_size);
421 417
422 if (!CheckForSufficientResource()) 418 if (!CheckForSufficientResource())
423 return false; 419 return false;
424 420
425 // Return early if InliningHelper allocates the buffer, so that we should 421 // Return early if InliningHelper allocates the buffer, so that we should
426 // inline the data into the IPC message without allocating SharedMemory. 422 // inline the data into the IPC message without allocating SharedMemory.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 } else { 605 } else {
610 UMA_HISTOGRAM_CUSTOM_COUNTS( 606 UMA_HISTOGRAM_CUSTOM_COUNTS(
611 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", 607 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB",
612 elapsed_time, 1, 100000, 100); 608 elapsed_time, 1, 100000, 100);
613 } 609 }
614 610
615 inlining_helper_->RecordHistogram(elapsed_time); 611 inlining_helper_->RecordHistogram(elapsed_time);
616 } 612 }
617 613
618 } // namespace content 614 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/async_resource_handler.h ('k') | content/browser/loader/detachable_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698