| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 browser_context_.reset(new ShellBrowserContext); | 130 browser_context_.reset(new ShellBrowserContext); |
| 131 | 131 |
| 132 // app_shell only supports a single user, so all preferences live in the user | 132 // app_shell only supports a single user, so all preferences live in the user |
| 133 // data directory, including the device-wide local state. | 133 // data directory, including the device-wide local state. |
| 134 local_state_ = shell_prefs::CreateLocalState(browser_context_->GetPath()); | 134 local_state_ = shell_prefs::CreateLocalState(browser_context_->GetPath()); |
| 135 user_pref_service_ = | 135 user_pref_service_ = |
| 136 shell_prefs::CreateUserPrefService(browser_context_.get()); | 136 shell_prefs::CreateUserPrefService(browser_context_.get()); |
| 137 | 137 |
| 138 #if defined(OS_CHROMEOS) | 138 #if defined(OS_CHROMEOS) |
| 139 chromeos::CrasAudioHandler::Initialize( | 139 chromeos::CrasAudioHandler::Initialize( |
| 140 new chromeos::AudioDevicesPrefHandlerImpl(local_state_.get(), "")); | 140 new chromeos::AudioDevicesPrefHandlerImpl(local_state_.get())); |
| 141 audio_controller_.reset(new ShellAudioController()); | 141 audio_controller_.reset(new ShellAudioController()); |
| 142 #endif | 142 #endif |
| 143 | 143 |
| 144 #if defined(USE_AURA) | 144 #if defined(USE_AURA) |
| 145 aura::Env::GetInstance()->set_context_factory(content::GetContextFactory()); | 145 aura::Env::GetInstance()->set_context_factory(content::GetContextFactory()); |
| 146 #endif | 146 #endif |
| 147 | 147 |
| 148 storage_monitor::StorageMonitor::Create(); | 148 storage_monitor::StorageMonitor::Create(); |
| 149 | 149 |
| 150 desktop_controller_.reset(browser_main_delegate_->CreateDesktopController()); | 150 desktop_controller_.reset(browser_main_delegate_->CreateDesktopController()); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } | 283 } |
| 284 | 284 |
| 285 void ShellBrowserMainParts::CreateExtensionSystem() { | 285 void ShellBrowserMainParts::CreateExtensionSystem() { |
| 286 DCHECK(browser_context_); | 286 DCHECK(browser_context_); |
| 287 extension_system_ = static_cast<ShellExtensionSystem*>( | 287 extension_system_ = static_cast<ShellExtensionSystem*>( |
| 288 ExtensionSystem::Get(browser_context_.get())); | 288 ExtensionSystem::Get(browser_context_.get())); |
| 289 extension_system_->InitForRegularProfile(true); | 289 extension_system_->InitForRegularProfile(true); |
| 290 } | 290 } |
| 291 | 291 |
| 292 } // namespace extensions | 292 } // namespace extensions |
| OLD | NEW |