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

Side by Side Diff: net/http/http_transaction_unittest.cc

Issue 16434016: Rewrite scoped_ptr<T>(NULL) to use the default ctor in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_stream_parser.cc ('k') | net/proxy/proxy_script_fetcher_impl.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/http/http_transaction_unittest.h" 5 #include "net/http/http_transaction_unittest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 149
150 //----------------------------------------------------------------------------- 150 //-----------------------------------------------------------------------------
151 151
152 // static 152 // static
153 int TestTransactionConsumer::quit_counter_ = 0; 153 int TestTransactionConsumer::quit_counter_ = 0;
154 154
155 TestTransactionConsumer::TestTransactionConsumer( 155 TestTransactionConsumer::TestTransactionConsumer(
156 net::RequestPriority priority, 156 net::RequestPriority priority,
157 net::HttpTransactionFactory* factory) 157 net::HttpTransactionFactory* factory)
158 : state_(IDLE), 158 : state_(IDLE), error_(net::OK) {
159 trans_(NULL),
160 error_(net::OK) {
161 // Disregard the error code. 159 // Disregard the error code.
162 factory->CreateTransaction(priority, &trans_, NULL); 160 factory->CreateTransaction(priority, &trans_, NULL);
163 ++quit_counter_; 161 ++quit_counter_;
164 } 162 }
165 163
166 TestTransactionConsumer::~TestTransactionConsumer() { 164 TestTransactionConsumer::~TestTransactionConsumer() {
167 } 165 }
168 166
169 void TestTransactionConsumer::Start(const net::HttpRequestInfo* request, 167 void TestTransactionConsumer::Start(const net::HttpRequestInfo* request,
170 const net::BoundNetLog& net_log) { 168 const net::BoundNetLog& net_log) {
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 431
434 if (rv > 0) 432 if (rv > 0)
435 content.append(buf->data(), rv); 433 content.append(buf->data(), rv);
436 else if (rv < 0) 434 else if (rv < 0)
437 return rv; 435 return rv;
438 } while (rv > 0); 436 } while (rv > 0);
439 437
440 result->swap(content); 438 result->swap(content);
441 return net::OK; 439 return net::OK;
442 } 440 }
OLDNEW
« no previous file with comments | « net/http/http_stream_parser.cc ('k') | net/proxy/proxy_script_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698