Chromium Code Reviews| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 ui::InitializeInputMethodForTesting(); | 121 ui::InitializeInputMethodForTesting(); |
| 122 #endif | 122 #endif |
| 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 // chrome-extension:// URLs are safe to request anywhere, but may only |
| 132 kExtensionScheme); | 132 // commit (including in iframes) in extension processes. |
| 133 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( | 133 content::ChildProcessSecurityPolicy::GetInstance() |
| 134 kExtensionResourceScheme); | 134 ->RegisterWebSafeIsolatedScheme(extensions::kExtensionScheme); |
| 135 // TODO(nick): Kill off kExtensionResourceScheme. | |
| 136 content::ChildProcessSecurityPolicy::GetInstance() | |
| 137 ->RegisterWebSafeIsolatedScheme(extensions::kExtensionResourceScheme); | |
|
ncarter (slow)
2016/09/29 16:27:43
reillyg's comment prompted me to rethink this. If
Devlin
2016/09/29 17:31:09
My $0.02: If this moves us toward parity, I'd say
ncarter (slow)
2016/09/29 21:01:46
I decided to revert this hunk, with the logic that
| |
| 135 | 138 |
| 136 // Return no error. | 139 // Return no error. |
| 137 return 0; | 140 return 0; |
| 138 } | 141 } |
| 139 | 142 |
| 140 void ShellBrowserMainParts::PreMainMessageLoopRun() { | 143 void ShellBrowserMainParts::PreMainMessageLoopRun() { |
| 141 // Initialize our "profile" equivalent. | 144 // Initialize our "profile" equivalent. |
| 142 browser_context_.reset(new ShellBrowserContext(this)); | 145 browser_context_.reset(new ShellBrowserContext(this)); |
| 143 | 146 |
| 144 // app_shell only supports a single user, so all preferences live in the user | 147 // app_shell only supports a single user, so all preferences live in the user |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 } | 288 } |
| 286 | 289 |
| 287 void ShellBrowserMainParts::CreateExtensionSystem() { | 290 void ShellBrowserMainParts::CreateExtensionSystem() { |
| 288 DCHECK(browser_context_); | 291 DCHECK(browser_context_); |
| 289 extension_system_ = static_cast<ShellExtensionSystem*>( | 292 extension_system_ = static_cast<ShellExtensionSystem*>( |
| 290 ExtensionSystem::Get(browser_context_.get())); | 293 ExtensionSystem::Get(browser_context_.get())); |
| 291 extension_system_->InitForRegularProfile(true); | 294 extension_system_->InitForRegularProfile(true); |
| 292 } | 295 } |
| 293 | 296 |
| 294 } // namespace extensions | 297 } // namespace extensions |
| OLD | NEW |