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/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 } | 123 } |
124 | 124 |
125 void ShellBrowserMainParts::PreEarlyInitialization() { | 125 void ShellBrowserMainParts::PreEarlyInitialization() { |
126 } | 126 } |
127 | 127 |
128 int ShellBrowserMainParts::PreCreateThreads() { | 128 int ShellBrowserMainParts::PreCreateThreads() { |
129 // TODO(jamescook): Initialize chromeos::CrosSettings here? | 129 // TODO(jamescook): Initialize chromeos::CrosSettings here? |
130 | 130 |
131 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( | 131 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( |
132 kExtensionScheme); | 132 kExtensionScheme); |
133 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( | |
134 kExtensionResourceScheme); | |
135 | 133 |
136 // Return no error. | 134 // Return no error. |
137 return 0; | 135 return 0; |
138 } | 136 } |
139 | 137 |
140 void ShellBrowserMainParts::PreMainMessageLoopRun() { | 138 void ShellBrowserMainParts::PreMainMessageLoopRun() { |
141 // Initialize our "profile" equivalent. | 139 // Initialize our "profile" equivalent. |
142 browser_context_.reset(new ShellBrowserContext(this)); | 140 browser_context_.reset(new ShellBrowserContext(this)); |
143 | 141 |
144 // app_shell only supports a single user, so all preferences live in the user | 142 // app_shell only supports a single user, so all preferences live in the user |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 } | 286 } |
289 | 287 |
290 void ShellBrowserMainParts::CreateExtensionSystem() { | 288 void ShellBrowserMainParts::CreateExtensionSystem() { |
291 DCHECK(browser_context_); | 289 DCHECK(browser_context_); |
292 extension_system_ = static_cast<ShellExtensionSystem*>( | 290 extension_system_ = static_cast<ShellExtensionSystem*>( |
293 ExtensionSystem::Get(browser_context_.get())); | 291 ExtensionSystem::Get(browser_context_.get())); |
294 extension_system_->InitForRegularProfile(true); | 292 extension_system_->InitForRegularProfile(true); |
295 } | 293 } |
296 | 294 |
297 } // namespace extensions | 295 } // namespace extensions |
OLD | NEW |