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

Side by Side Diff: chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc

Issue 16703018: Rewrite scoped_ptr<T>(NULL) to use the default ctor in chrome/. (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
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 16 matching lines...) Expand all
27 FILE_PATH_LITERAL("chrome/test/data"); 27 FILE_PATH_LITERAL("chrome/test/data");
28 28
29 int g_request_context_getter_instances = 0; 29 int g_request_context_getter_instances = 0;
30 class TrackingTestURLRequestContextGetter 30 class TrackingTestURLRequestContextGetter
31 : public net::TestURLRequestContextGetter { 31 : public net::TestURLRequestContextGetter {
32 public: 32 public:
33 explicit TrackingTestURLRequestContextGetter( 33 explicit TrackingTestURLRequestContextGetter(
34 base::MessageLoopProxy* io_message_loop_proxy, 34 base::MessageLoopProxy* io_message_loop_proxy,
35 net::URLRequestThrottlerManager* throttler_manager) 35 net::URLRequestThrottlerManager* throttler_manager)
36 : TestURLRequestContextGetter(io_message_loop_proxy), 36 : TestURLRequestContextGetter(io_message_loop_proxy),
37 throttler_manager_(throttler_manager), 37 throttler_manager_(throttler_manager) {
38 context_(NULL) {
39 g_request_context_getter_instances++; 38 g_request_context_getter_instances++;
40 } 39 }
41 40
42 virtual net::TestURLRequestContext* GetURLRequestContext() OVERRIDE { 41 virtual net::TestURLRequestContext* GetURLRequestContext() OVERRIDE {
43 if (!context_.get()) { 42 if (!context_.get()) {
44 context_.reset(new net::TestURLRequestContext(true)); 43 context_.reset(new net::TestURLRequestContext(true));
45 context_->set_throttler_manager(throttler_manager_); 44 context_->set_throttler_manager(throttler_manager_);
46 context_->Init(); 45 context_->Init();
47 } 46 }
48 return context_.get(); 47 return context_.get();
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 base::FilePath(kDocRoot)); 371 base::FilePath(kDocRoot));
373 ASSERT_TRUE(test_server.Start()); 372 ASSERT_TRUE(test_server.Start());
374 373
375 GURL url(test_server.GetURL("defaultresponse")); 374 GURL url(test_server.GetURL("defaultresponse"));
376 CreateFetcher(url, 11); 375 CreateFetcher(url, 11);
377 376
378 base::MessageLoop::current()->Run(); 377 base::MessageLoop::current()->Run();
379 } 378 }
380 379
381 } // namespace cloud_print 380 } // namespace cloud_print
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698