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

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

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 #include "extensions/shell/browser/shell_browser_main_parts.h" 5 #include "extensions/shell/browser/shell_browser_main_parts.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 #include "components/omaha_query_params/omaha_query_params.h" 10 #include "components/omaha_query_params/omaha_query_params.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "extensions/shell/browser/shell_nacl_browser_delegate.h" 51 #include "extensions/shell/browser/shell_nacl_browser_delegate.h"
52 #endif 52 #endif
53 53
54 using content::BrowserContext; 54 using content::BrowserContext;
55 55
56 namespace extensions { 56 namespace extensions {
57 57
58 ShellBrowserMainParts::ShellBrowserMainParts( 58 ShellBrowserMainParts::ShellBrowserMainParts(
59 const content::MainFunctionParams& parameters, 59 const content::MainFunctionParams& parameters,
60 ShellBrowserMainDelegate* browser_main_delegate) 60 ShellBrowserMainDelegate* browser_main_delegate)
61 : extension_system_(NULL), 61 : extension_system_(nullptr),
62 parameters_(parameters), 62 parameters_(parameters),
63 run_message_loop_(true), 63 run_message_loop_(true),
64 browser_main_delegate_(browser_main_delegate) { 64 browser_main_delegate_(browser_main_delegate) {
65 } 65 }
66 66
67 ShellBrowserMainParts::~ShellBrowserMainParts() { 67 ShellBrowserMainParts::~ShellBrowserMainParts() {
68 } 68 }
69 69
70 void ShellBrowserMainParts::PreMainMessageLoopStart() { 70 void ShellBrowserMainParts::PreMainMessageLoopStart() {
71 // TODO(jamescook): Initialize touch here? 71 // TODO(jamescook): Initialize touch here?
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 run_loop.Run(); 179 run_loop.Run();
180 *result_code = content::RESULT_CODE_NORMAL_EXIT; 180 *result_code = content::RESULT_CODE_NORMAL_EXIT;
181 return true; 181 return true;
182 } 182 }
183 183
184 void ShellBrowserMainParts::PostMainMessageLoopRun() { 184 void ShellBrowserMainParts::PostMainMessageLoopRun() {
185 browser_main_delegate_->Shutdown(); 185 browser_main_delegate_->Shutdown();
186 186
187 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices( 187 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
188 browser_context_.get()); 188 browser_context_.get());
189 extension_system_ = NULL; 189 extension_system_ = nullptr;
190 ExtensionsBrowserClient::Set(NULL); 190 ExtensionsBrowserClient::Set(nullptr);
191 extensions_browser_client_.reset(); 191 extensions_browser_client_.reset();
192 browser_context_.reset(); 192 browser_context_.reset();
193 193
194 desktop_controller_.reset(); 194 desktop_controller_.reset();
195 195
196 #if !defined(OS_ANDROID) && !defined(OS_IOS) 196 #if !defined(OS_ANDROID) && !defined(OS_IOS)
197 storage_monitor::StorageMonitor::Destroy(); 197 storage_monitor::StorageMonitor::Destroy();
198 #endif 198 #endif
199 } 199 }
200 200
201 void ShellBrowserMainParts::PostDestroyThreads() { 201 void ShellBrowserMainParts::PostDestroyThreads() {
202 #if defined(OS_CHROMEOS) 202 #if defined(OS_CHROMEOS)
203 audio_controller_.reset(); 203 audio_controller_.reset();
204 chromeos::CrasAudioHandler::Shutdown(); 204 chromeos::CrasAudioHandler::Shutdown();
205 network_controller_.reset(); 205 network_controller_.reset();
206 chromeos::NetworkHandler::Shutdown(); 206 chromeos::NetworkHandler::Shutdown();
207 chromeos::DBusThreadManager::Shutdown(); 207 chromeos::DBusThreadManager::Shutdown();
208 #endif 208 #endif
209 } 209 }
210 210
211 void ShellBrowserMainParts::CreateExtensionSystem() { 211 void ShellBrowserMainParts::CreateExtensionSystem() {
212 DCHECK(browser_context_); 212 DCHECK(browser_context_);
213 extension_system_ = static_cast<ShellExtensionSystem*>( 213 extension_system_ = static_cast<ShellExtensionSystem*>(
214 ExtensionSystem::Get(browser_context_.get())); 214 ExtensionSystem::Get(browser_context_.get()));
215 extension_system_->InitForRegularProfile(true); 215 extension_system_->InitForRegularProfile(true);
216 } 216 }
217 217
218 } // namespace extensions 218 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698