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

Side by Side Diff: content/public/test/test_content_client_initializer.h

Issue 1874903002: Convert //content from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent 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 #ifndef CONTENT_PUBLIC_TEST_TEST_CONTENT_CLIENT_INITIALIZER_H_ 5 #ifndef CONTENT_PUBLIC_TEST_TEST_CONTENT_CLIENT_INITIALIZER_H_
6 #define CONTENT_PUBLIC_TEST_TEST_CONTENT_CLIENT_INITIALIZER_H_ 6 #define CONTENT_PUBLIC_TEST_TEST_CONTENT_CLIENT_INITIALIZER_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 11
11 namespace content { 12 namespace content {
12 13
13 class ContentClient; 14 class ContentClient;
14 class MockRenderProcessHostFactory; 15 class MockRenderProcessHostFactory;
15 class NotificationServiceImpl; 16 class NotificationServiceImpl;
16 class TestContentBrowserClient; 17 class TestContentBrowserClient;
17 class TestRenderViewHostFactory; 18 class TestRenderViewHostFactory;
18 19
19 // Initializes various objects needed to run unit tests that use content:: 20 // Initializes various objects needed to run unit tests that use content::
20 // objects. Currently this includes setting up the notification service, 21 // objects. Currently this includes setting up the notification service,
21 // creating and setting the content client and the content browser client. 22 // creating and setting the content client and the content browser client.
22 class TestContentClientInitializer { 23 class TestContentClientInitializer {
23 public: 24 public:
24 TestContentClientInitializer(); 25 TestContentClientInitializer();
25 ~TestContentClientInitializer(); 26 ~TestContentClientInitializer();
26 27
27 // Enables switching RenderViewHost creation to use the test version instead 28 // Enables switching RenderViewHost creation to use the test version instead
28 // of the real implementation. This will last throughout the lifetime of this 29 // of the real implementation. This will last throughout the lifetime of this
29 // class. 30 // class.
30 void CreateTestRenderViewHosts(); 31 void CreateTestRenderViewHosts();
31 32
32 private: 33 private:
33 scoped_ptr<NotificationServiceImpl> notification_service_; 34 std::unique_ptr<NotificationServiceImpl> notification_service_;
34 scoped_ptr<ContentClient> content_client_; 35 std::unique_ptr<ContentClient> content_client_;
35 scoped_ptr<TestContentBrowserClient> content_browser_client_; 36 std::unique_ptr<TestContentBrowserClient> content_browser_client_;
36 scoped_ptr<MockRenderProcessHostFactory> rph_factory_; 37 std::unique_ptr<MockRenderProcessHostFactory> rph_factory_;
37 scoped_ptr<TestRenderViewHostFactory> test_render_view_host_factory_; 38 std::unique_ptr<TestRenderViewHostFactory> test_render_view_host_factory_;
38 39
39 DISALLOW_COPY_AND_ASSIGN(TestContentClientInitializer); 40 DISALLOW_COPY_AND_ASSIGN(TestContentClientInitializer);
40 }; 41 };
41 42
42 } // namespace content 43 } // namespace content
43 44
44 #endif // CONTENT_PUBLIC_TEST_TEST_CONTENT_CLIENT_INITIALIZER_H_ 45 #endif // CONTENT_PUBLIC_TEST_TEST_CONTENT_CLIENT_INITIALIZER_H_
OLDNEW
« no previous file with comments | « content/public/test/test_browser_thread_bundle.h ('k') | content/public/test/test_download_request_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698