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

Side by Side Diff: chrome/browser/extensions/test_extension_environment.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_
6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_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/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
11 #include "build/build_config.h" 12 #include "build/build_config.h"
12 13
13 #if defined(OS_WIN) 14 #if defined(OS_WIN)
14 #include "ui/base/win/scoped_ole_initializer.h" 15 #include "ui/base/win/scoped_ole_initializer.h"
15 #endif 16 #endif
16 17
17 class ExtensionService; 18 class ExtensionService;
18 class TestingProfile; 19 class TestingProfile;
19 20
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Use a specific extension ID instead of the default generated in 73 // Use a specific extension ID instead of the default generated in
73 // Extension::Create. 74 // Extension::Create.
74 const Extension* MakeExtension(const base::Value& manifest_extra, 75 const Extension* MakeExtension(const base::Value& manifest_extra,
75 const std::string& id); 76 const std::string& id);
76 77
77 // Generates a valid packaged app manifest with the given ID. If |install| 78 // Generates a valid packaged app manifest with the given ID. If |install|
78 // it gets added to the ExtensionService in |profile|. 79 // it gets added to the ExtensionService in |profile|.
79 scoped_refptr<Extension> MakePackagedApp(const std::string& id, bool install); 80 scoped_refptr<Extension> MakePackagedApp(const std::string& id, bool install);
80 81
81 // Returns a test web contents that has a tab id. 82 // Returns a test web contents that has a tab id.
82 scoped_ptr<content::WebContents> MakeTab() const; 83 std::unique_ptr<content::WebContents> MakeTab() const;
83 84
84 // Deletes the testing profile to test profile teardown. 85 // Deletes the testing profile to test profile teardown.
85 void DeleteProfile(); 86 void DeleteProfile();
86 87
87 private: 88 private:
88 class ChromeOSEnv; 89 class ChromeOSEnv;
89 90
90 void Init(); 91 void Init();
91 92
92 scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_; 93 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
93 scoped_ptr<ChromeOSEnv> chromeos_env_; 94 std::unique_ptr<ChromeOSEnv> chromeos_env_;
94 95
95 #if defined(OS_WIN) 96 #if defined(OS_WIN)
96 ui::ScopedOleInitializer ole_initializer_; 97 ui::ScopedOleInitializer ole_initializer_;
97 #endif 98 #endif
98 scoped_ptr<TestingProfile> profile_; 99 std::unique_ptr<TestingProfile> profile_;
99 ExtensionService* extension_service_; 100 ExtensionService* extension_service_;
100 101
101 DISALLOW_COPY_AND_ASSIGN(TestExtensionEnvironment); 102 DISALLOW_COPY_AND_ASSIGN(TestExtensionEnvironment);
102 }; 103 };
103 104
104 } // namespace extensions 105 } // namespace extensions
105 106
106 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_ 107 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/tab_helper.h ('k') | chrome/browser/extensions/test_extension_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698