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

Side by Side Diff: content/public/test/test_web_contents_factory.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
« no previous file with comments | « content/public/test/test_utils.cc ('k') | content/public/test/test_web_ui.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_WEB_CONTENTS_FACTORY_H_ 5 #ifndef CONTENT_PUBLIC_TEST_TEST_WEB_CONTENTS_FACTORY_H_
6 #define CONTENT_PUBLIC_TEST_TEST_WEB_CONTENTS_FACTORY_H_ 6 #define CONTENT_PUBLIC_TEST_TEST_WEB_CONTENTS_FACTORY_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 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
11 12
12 namespace content { 13 namespace content {
13 class BrowserContext; 14 class BrowserContext;
14 class RenderViewHostTestEnabler; 15 class RenderViewHostTestEnabler;
15 class WebContents; 16 class WebContents;
16 17
17 // A helper class to create test web contents (tabs) for unit tests, without 18 // A helper class to create test web contents (tabs) for unit tests, without
18 // inheriting from RenderViewTestHarness. Can create web contents, and will 19 // inheriting from RenderViewTestHarness. Can create web contents, and will
19 // clean up after itself upon destruction. Owns all created web contents. 20 // clean up after itself upon destruction. Owns all created web contents.
(...skipping 10 matching lines...) Expand all
30 public: 31 public:
31 TestWebContentsFactory(); 32 TestWebContentsFactory();
32 ~TestWebContentsFactory(); 33 ~TestWebContentsFactory();
33 34
34 // Creates a new WebContents with the given |context|, and returns it. 35 // Creates a new WebContents with the given |context|, and returns it.
35 // Ownership remains with the TestWebContentsFactory. 36 // Ownership remains with the TestWebContentsFactory.
36 WebContents* CreateWebContents(BrowserContext* context); 37 WebContents* CreateWebContents(BrowserContext* context);
37 38
38 private: 39 private:
39 // The test factory (and friends) for creating test web contents. 40 // The test factory (and friends) for creating test web contents.
40 scoped_ptr<RenderViewHostTestEnabler> rvh_enabler_; 41 std::unique_ptr<RenderViewHostTestEnabler> rvh_enabler_;
41 42
42 // The vector of web contents that this class created. 43 // The vector of web contents that this class created.
43 ScopedVector<WebContents> web_contents_; 44 ScopedVector<WebContents> web_contents_;
44 45
45 DISALLOW_COPY_AND_ASSIGN(TestWebContentsFactory); 46 DISALLOW_COPY_AND_ASSIGN(TestWebContentsFactory);
46 }; 47 };
47 48
48 } // namespace content 49 } // namespace content
49 50
50 #endif // CONTENT_PUBLIC_TEST_TEST_WEB_CONTENTS_FACTORY_H_ 51 #endif // CONTENT_PUBLIC_TEST_TEST_WEB_CONTENTS_FACTORY_H_
OLDNEW
« no previous file with comments | « content/public/test/test_utils.cc ('k') | content/public/test/test_web_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698