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

Side by Side Diff: net/url_request/url_request_job.cc

Issue 495093005: Remove implicit conversions from scoped_refptr to T* in net/url_request/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_redirect_job.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 "net/url_request/url_request_job.h" 5 #include "net/url_request/url_request_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/power_monitor/power_monitor.h" 10 #include "base/power_monitor/power_monitor.h"
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 void URLRequestJob::DoneReadingRedirectResponse() { 524 void URLRequestJob::DoneReadingRedirectResponse() {
525 } 525 }
526 526
527 void URLRequestJob::FilteredDataRead(int bytes_read) { 527 void URLRequestJob::FilteredDataRead(int bytes_read) {
528 DCHECK(filter_); 528 DCHECK(filter_);
529 filter_->FlushStreamBuffer(bytes_read); 529 filter_->FlushStreamBuffer(bytes_read);
530 } 530 }
531 531
532 bool URLRequestJob::ReadFilteredData(int* bytes_read) { 532 bool URLRequestJob::ReadFilteredData(int* bytes_read) {
533 DCHECK(filter_); 533 DCHECK(filter_);
534 DCHECK(filtered_read_buffer_); 534 DCHECK(filtered_read_buffer_.get());
535 DCHECK_GT(filtered_read_buffer_len_, 0); 535 DCHECK_GT(filtered_read_buffer_len_, 0);
536 DCHECK_LT(filtered_read_buffer_len_, 1000000); // Sanity check. 536 DCHECK_LT(filtered_read_buffer_len_, 1000000); // Sanity check.
537 DCHECK(!raw_read_buffer_); 537 DCHECK(!raw_read_buffer_.get());
538 538
539 *bytes_read = 0; 539 *bytes_read = 0;
540 bool rv = false; 540 bool rv = false;
541 541
542 for (;;) { 542 for (;;) {
543 if (is_done()) 543 if (is_done())
544 return true; 544 return true;
545 545
546 if (!filter_needs_more_output_space_ && !filter_->stream_data_len()) { 546 if (!filter_needs_more_output_space_ && !filter_->stream_data_len()) {
547 // We don't have any raw data to work with, so read from the transaction. 547 // We don't have any raw data to work with, so read from the transaction.
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 !redirect_info.new_url.SchemeIsSecure()) { 795 !redirect_info.new_url.SchemeIsSecure()) {
796 redirect_info.new_referrer.clear(); 796 redirect_info.new_referrer.clear();
797 } else { 797 } else {
798 redirect_info.new_referrer = request_->referrer(); 798 redirect_info.new_referrer = request_->referrer();
799 } 799 }
800 800
801 return redirect_info; 801 return redirect_info;
802 } 802 }
803 803
804 } // namespace net 804 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_redirect_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698