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

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

Issue 819193002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 void ShellBrowserMainParts::PostMainMessageLoopStart() { 103 void ShellBrowserMainParts::PostMainMessageLoopStart() {
104 #if defined(OS_CHROMEOS) 104 #if defined(OS_CHROMEOS)
105 // Perform initialization of D-Bus objects here rather than in the below 105 // Perform initialization of D-Bus objects here rather than in the below
106 // helper classes so those classes' tests can initialize stub versions of the 106 // helper classes so those classes' tests can initialize stub versions of the
107 // D-Bus objects. 107 // D-Bus objects.
108 chromeos::DBusThreadManager::Initialize(); 108 chromeos::DBusThreadManager::Initialize();
109 109
110 chromeos::NetworkHandler::Initialize(); 110 chromeos::NetworkHandler::Initialize();
111 network_controller_.reset(new ShellNetworkController( 111 network_controller_.reset(new ShellNetworkController(
112 CommandLine::ForCurrentProcess()->GetSwitchValueNative( 112 base::CommandLine::ForCurrentProcess()->GetSwitchValueNative(
113 switches::kAppShellPreferredNetwork))); 113 switches::kAppShellPreferredNetwork)));
114 #else 114 #else
115 // Non-Chrome OS platforms are for developer convenience, so use a test IME. 115 // Non-Chrome OS platforms are for developer convenience, so use a test IME.
116 ui::InitializeInputMethodForTesting(); 116 ui::InitializeInputMethodForTesting();
117 #endif 117 #endif
118 } 118 }
119 119
120 void ShellBrowserMainParts::PreEarlyInitialization() { 120 void ShellBrowserMainParts::PreEarlyInitialization() {
121 } 121 }
122 122
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 // Register additional KeyedService factories here. See 179 // Register additional KeyedService factories here. See
180 // ChromeBrowserMainExtraPartsProfiles for details. 180 // ChromeBrowserMainExtraPartsProfiles for details.
181 EnsureBrowserContextKeyedServiceFactoriesBuilt(); 181 EnsureBrowserContextKeyedServiceFactoriesBuilt();
182 ShellExtensionSystemFactory::GetInstance(); 182 ShellExtensionSystemFactory::GetInstance();
183 183
184 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( 184 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices(
185 browser_context_.get()); 185 browser_context_.get());
186 186
187 // Initialize OAuth2 support from command line. 187 // Initialize OAuth2 support from command line.
188 CommandLine* cmd = CommandLine::ForCurrentProcess(); 188 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
189 oauth2_token_service_.reset(new ShellOAuth2TokenService( 189 oauth2_token_service_.reset(new ShellOAuth2TokenService(
190 browser_context_.get(), 190 browser_context_.get(),
191 cmd->GetSwitchValueASCII(switches::kAppShellUser), 191 cmd->GetSwitchValueASCII(switches::kAppShellUser),
192 cmd->GetSwitchValueASCII(switches::kAppShellRefreshToken))); 192 cmd->GetSwitchValueASCII(switches::kAppShellRefreshToken)));
193 193
194 #if !defined(DISABLE_NACL) 194 #if !defined(DISABLE_NACL)
195 // Takes ownership. 195 // Takes ownership.
196 nacl::NaClBrowser::SetDelegate( 196 nacl::NaClBrowser::SetDelegate(
197 new ShellNaClBrowserDelegate(browser_context_.get())); 197 new ShellNaClBrowserDelegate(browser_context_.get()));
198 // Track the task so it can be canceled if app_shell shuts down very quickly, 198 // Track the task so it can be canceled if app_shell shuts down very quickly,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 290 }
291 291
292 void ShellBrowserMainParts::CreateExtensionSystem() { 292 void ShellBrowserMainParts::CreateExtensionSystem() {
293 DCHECK(browser_context_); 293 DCHECK(browser_context_);
294 extension_system_ = static_cast<ShellExtensionSystem*>( 294 extension_system_ = static_cast<ShellExtensionSystem*>(
295 ExtensionSystem::Get(browser_context_.get())); 295 ExtensionSystem::Get(browser_context_.get()));
296 extension_system_->InitForRegularProfile(true); 296 extension_system_->InitForRegularProfile(true);
297 } 297 }
298 298
299 } // namespace extensions 299 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698