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

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

Issue 1899083002: Convert //chrome from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/location.h" 6 #include "base/location.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 protected: 52 protected:
53 ~TrackingTestURLRequestContextGetter() override { 53 ~TrackingTestURLRequestContextGetter() override {
54 g_request_context_getter_instances--; 54 g_request_context_getter_instances--;
55 } 55 }
56 56
57 private: 57 private:
58 // Not owned here. 58 // Not owned here.
59 net::URLRequestThrottlerManager* throttler_manager_; 59 net::URLRequestThrottlerManager* throttler_manager_;
60 scoped_ptr<net::TestURLRequestContext> context_; 60 std::unique_ptr<net::TestURLRequestContext> context_;
61 }; 61 };
62 62
63 class TestCloudPrintURLFetcher : public CloudPrintURLFetcher { 63 class TestCloudPrintURLFetcher : public CloudPrintURLFetcher {
64 public: 64 public:
65 explicit TestCloudPrintURLFetcher( 65 explicit TestCloudPrintURLFetcher(
66 base::SingleThreadTaskRunner* io_task_runner) 66 base::SingleThreadTaskRunner* io_task_runner)
67 : io_task_runner_(io_task_runner) {} 67 : io_task_runner_(io_task_runner) {}
68 68
69 net::URLRequestContextGetter* GetRequestContextGetter() override { 69 net::URLRequestContextGetter* GetRequestContextGetter() override {
70 return new TrackingTestURLRequestContextGetter(io_task_runner_.get(), 70 return new TrackingTestURLRequestContextGetter(io_task_runner_.get(),
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 test_server.AddDefaultHandlers(base::FilePath(kDocRoot)); 365 test_server.AddDefaultHandlers(base::FilePath(kDocRoot));
366 ASSERT_TRUE(test_server.Start()); 366 ASSERT_TRUE(test_server.Start());
367 367
368 GURL url(test_server.GetURL("/defaultresponse")); 368 GURL url(test_server.GetURL("/defaultresponse"));
369 CreateFetcher(url, 11); 369 CreateFetcher(url, 11);
370 370
371 base::MessageLoop::current()->Run(); 371 base::MessageLoop::current()->Run();
372 } 372 }
373 373
374 } // namespace cloud_print 374 } // namespace cloud_print
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_url_fetcher.cc ('k') | chrome/service/cloud_print/connector_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698