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

Unified Diff: net/url_request/url_request_test_util.cc

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request_test_job.cc ('k') | net/url_request/url_request_throttler_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_test_util.cc
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index 8fd603d81aadf63e2ecd47329086795c2f95708a..95964fe4632146e6becdb46d5a7c817169b6f358 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -135,14 +135,14 @@ TestURLRequest::~TestURLRequest() {
TestURLRequestContextGetter::TestURLRequestContextGetter(
const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner)
: network_task_runner_(network_task_runner) {
- DCHECK(network_task_runner_);
+ DCHECK(network_task_runner_.get());
}
TestURLRequestContextGetter::TestURLRequestContextGetter(
const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner,
scoped_ptr<TestURLRequestContext> context)
: network_task_runner_(network_task_runner), context_(context.Pass()) {
- DCHECK(network_task_runner_);
+ DCHECK(network_task_runner_.get());
}
TestURLRequestContextGetter::~TestURLRequestContextGetter() {}
@@ -234,7 +234,7 @@ void TestDelegate::OnResponseStarted(URLRequest* request) {
} else {
// Initiate the first read.
int bytes_read = 0;
- if (request->Read(buf_, kBufferSize, &bytes_read))
+ if (request->Read(buf_.get(), kBufferSize, &bytes_read))
OnReadCompleted(request, bytes_read);
else if (!request->status().is_io_pending())
OnResponseCompleted(request);
@@ -262,7 +262,7 @@ void TestDelegate::OnReadCompleted(URLRequest* request, int bytes_read) {
// If it was not end of stream, request to read more.
if (request->status().is_success() && bytes_read > 0) {
bytes_read = 0;
- while (request->Read(buf_, kBufferSize, &bytes_read)) {
+ while (request->Read(buf_.get(), kBufferSize, &bytes_read)) {
if (bytes_read > 0) {
data_received_.append(buf_->data(), bytes_read);
received_bytes_count_ += bytes_read;
« no previous file with comments | « net/url_request/url_request_test_job.cc ('k') | net/url_request/url_request_throttler_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698