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

Side by Side Diff: extensions/shell/browser/shell_browser_main_parts.h

Issue 1908953003: Convert //extensions/{common,shell} from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_
7 7
8 #include <memory>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/task/cancelable_task_tracker.h" 12 #include "base/task/cancelable_task_tracker.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 #include "content/public/browser/browser_main_parts.h" 14 #include "content/public/browser/browser_main_parts.h"
14 #include "content/public/common/main_function_params.h" 15 #include "content/public/common/main_function_params.h"
15 #include "ui/aura/window_tree_host_observer.h" 16 #include "ui/aura/window_tree_host_observer.h"
16 17
17 class PrefService; 18 class PrefService;
18 19
19 namespace content { 20 namespace content {
20 class BrowserContext; 21 class BrowserContext;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 virtual ExtensionsClient* CreateExtensionsClient(); 75 virtual ExtensionsClient* CreateExtensionsClient();
75 virtual ExtensionsBrowserClient* CreateExtensionsBrowserClient( 76 virtual ExtensionsBrowserClient* CreateExtensionsBrowserClient(
76 content::BrowserContext* context, 77 content::BrowserContext* context,
77 PrefService* service); 78 PrefService* service);
78 79
79 private: 80 private:
80 // Creates and initializes the ExtensionSystem. 81 // Creates and initializes the ExtensionSystem.
81 void CreateExtensionSystem(); 82 void CreateExtensionSystem();
82 83
83 #if defined(OS_CHROMEOS) 84 #if defined(OS_CHROMEOS)
84 scoped_ptr<ShellNetworkController> network_controller_; 85 std::unique_ptr<ShellNetworkController> network_controller_;
85 scoped_ptr<ShellAudioController> audio_controller_; 86 std::unique_ptr<ShellAudioController> audio_controller_;
86 #endif 87 #endif
87 scoped_ptr<DesktopController> desktop_controller_; 88 std::unique_ptr<DesktopController> desktop_controller_;
88 scoped_ptr<ShellBrowserContext> browser_context_; 89 std::unique_ptr<ShellBrowserContext> browser_context_;
89 scoped_ptr<PrefService> local_state_; 90 std::unique_ptr<PrefService> local_state_;
90 scoped_ptr<PrefService> user_pref_service_; 91 std::unique_ptr<PrefService> user_pref_service_;
91 scoped_ptr<ShellDeviceClient> device_client_; 92 std::unique_ptr<ShellDeviceClient> device_client_;
92 scoped_ptr<AppWindowClient> app_window_client_; 93 std::unique_ptr<AppWindowClient> app_window_client_;
93 scoped_ptr<ExtensionsClient> extensions_client_; 94 std::unique_ptr<ExtensionsClient> extensions_client_;
94 scoped_ptr<ExtensionsBrowserClient> extensions_browser_client_; 95 std::unique_ptr<ExtensionsBrowserClient> extensions_browser_client_;
95 scoped_ptr<devtools_http_handler::DevToolsHttpHandler> devtools_http_handler_; 96 std::unique_ptr<devtools_http_handler::DevToolsHttpHandler>
96 scoped_ptr<ShellUpdateQueryParamsDelegate> update_query_params_delegate_; 97 devtools_http_handler_;
97 scoped_ptr<ShellOAuth2TokenService> oauth2_token_service_; 98 std::unique_ptr<ShellUpdateQueryParamsDelegate> update_query_params_delegate_;
99 std::unique_ptr<ShellOAuth2TokenService> oauth2_token_service_;
98 100
99 // Owned by the KeyedService system. 101 // Owned by the KeyedService system.
100 ShellExtensionSystem* extension_system_; 102 ShellExtensionSystem* extension_system_;
101 103
102 // For running app browsertests. 104 // For running app browsertests.
103 const content::MainFunctionParams parameters_; 105 const content::MainFunctionParams parameters_;
104 106
105 // If true, indicates the main message loop should be run 107 // If true, indicates the main message loop should be run
106 // in MainMessageLoopRun. If false, it has already been run. 108 // in MainMessageLoopRun. If false, it has already been run.
107 bool run_message_loop_; 109 bool run_message_loop_;
108 110
109 scoped_ptr<ShellBrowserMainDelegate> browser_main_delegate_; 111 std::unique_ptr<ShellBrowserMainDelegate> browser_main_delegate_;
110 112
111 #if !defined(DISABLE_NACL) 113 #if !defined(DISABLE_NACL)
112 base::CancelableTaskTracker task_tracker_; 114 base::CancelableTaskTracker task_tracker_;
113 #endif 115 #endif
114 116
115 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts); 117 DISALLOW_COPY_AND_ASSIGN(ShellBrowserMainParts);
116 }; 118 };
117 119
118 } // namespace extensions 120 } // namespace extensions
119 121
120 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_ 122 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_BROWSER_MAIN_PARTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698