| OLD | NEW |
| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // Perform initialization of D-Bus objects here rather than in the below | 106 // Perform initialization of D-Bus objects here rather than in the below |
| 107 // helper classes so those classes' tests can initialize stub versions of the | 107 // helper classes so those classes' tests can initialize stub versions of the |
| 108 // D-Bus objects. | 108 // D-Bus objects. |
| 109 chromeos::DBusThreadManager::Initialize(); | 109 chromeos::DBusThreadManager::Initialize(); |
| 110 chromeos::disks::DiskMountManager::Initialize(); | 110 chromeos::disks::DiskMountManager::Initialize(); |
| 111 | 111 |
| 112 chromeos::NetworkHandler::Initialize(); | 112 chromeos::NetworkHandler::Initialize(); |
| 113 network_controller_.reset(new ShellNetworkController( | 113 network_controller_.reset(new ShellNetworkController( |
| 114 base::CommandLine::ForCurrentProcess()->GetSwitchValueNative( | 114 base::CommandLine::ForCurrentProcess()->GetSwitchValueNative( |
| 115 switches::kAppShellPreferredNetwork))); | 115 switches::kAppShellPreferredNetwork))); |
| 116 |
| 117 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 118 switches::kAppShellAllowRoaming)) { |
| 119 network_controller_->SetCellularAllowRoaming(true); |
| 120 } |
| 121 |
| 116 #else | 122 #else |
| 117 // Non-Chrome OS platforms are for developer convenience, so use a test IME. | 123 // Non-Chrome OS platforms are for developer convenience, so use a test IME. |
| 118 ui::InitializeInputMethodForTesting(); | 124 ui::InitializeInputMethodForTesting(); |
| 119 #endif | 125 #endif |
| 120 } | 126 } |
| 121 | 127 |
| 122 void ShellBrowserMainParts::PreEarlyInitialization() { | 128 void ShellBrowserMainParts::PreEarlyInitialization() { |
| 123 } | 129 } |
| 124 | 130 |
| 125 int ShellBrowserMainParts::PreCreateThreads() { | 131 int ShellBrowserMainParts::PreCreateThreads() { |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 } | 299 } |
| 294 | 300 |
| 295 void ShellBrowserMainParts::CreateExtensionSystem() { | 301 void ShellBrowserMainParts::CreateExtensionSystem() { |
| 296 DCHECK(browser_context_); | 302 DCHECK(browser_context_); |
| 297 extension_system_ = static_cast<ShellExtensionSystem*>( | 303 extension_system_ = static_cast<ShellExtensionSystem*>( |
| 298 ExtensionSystem::Get(browser_context_.get())); | 304 ExtensionSystem::Get(browser_context_.get())); |
| 299 extension_system_->InitForRegularProfile(true); | 305 extension_system_->InitForRegularProfile(true); |
| 300 } | 306 } |
| 301 | 307 |
| 302 } // namespace extensions | 308 } // namespace extensions |
| OLD | NEW |