OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 void BrowserProcessImpl::PreCreateThreads() { | 1051 void BrowserProcessImpl::PreCreateThreads() { |
1052 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1052 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1053 // Register the chrome-extension scheme to reflect the extension process | 1053 // Register the chrome-extension scheme to reflect the extension process |
1054 // model. Controlled by a field trial, so we can't do this earlier. | 1054 // model. Controlled by a field trial, so we can't do this earlier. |
1055 base::FieldTrialList::FindFullName("SiteIsolationExtensions"); | 1055 base::FieldTrialList::FindFullName("SiteIsolationExtensions"); |
1056 if (extensions::IsIsolateExtensionsEnabled()) { | 1056 if (extensions::IsIsolateExtensionsEnabled()) { |
1057 // chrome-extension:// URLs are safe to request anywhere, but may only | 1057 // chrome-extension:// URLs are safe to request anywhere, but may only |
1058 // commit (including in iframes) in extension processes. | 1058 // commit (including in iframes) in extension processes. |
1059 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeIsolatedScheme( | 1059 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeIsolatedScheme( |
1060 extensions::kExtensionScheme, true); | 1060 extensions::kExtensionScheme, true); |
1061 // TODO(nick): Kill off kExtensionResourceScheme. | |
1062 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeIsolatedScheme( | |
1063 extensions::kExtensionResourceScheme, false); | |
1064 } else { | 1061 } else { |
1065 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( | 1062 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( |
1066 extensions::kExtensionScheme); | 1063 extensions::kExtensionScheme); |
1067 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( | |
1068 extensions::kExtensionResourceScheme); | |
1069 } | 1064 } |
1070 #endif | 1065 #endif |
1071 | 1066 |
1072 io_thread_.reset( | 1067 io_thread_.reset( |
1073 new IOThread(local_state(), policy_service(), net_log_.get(), | 1068 new IOThread(local_state(), policy_service(), net_log_.get(), |
1074 extension_event_router_forwarder())); | 1069 extension_event_router_forwarder())); |
1075 } | 1070 } |
1076 | 1071 |
1077 void BrowserProcessImpl::PreMainMessageLoopRun() { | 1072 void BrowserProcessImpl::PreMainMessageLoopRun() { |
1078 TRACE_EVENT0("startup", "BrowserProcessImpl::PreMainMessageLoopRun"); | 1073 TRACE_EVENT0("startup", "BrowserProcessImpl::PreMainMessageLoopRun"); |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1412 } | 1407 } |
1413 | 1408 |
1414 void BrowserProcessImpl::OnAutoupdateTimer() { | 1409 void BrowserProcessImpl::OnAutoupdateTimer() { |
1415 if (CanAutorestartForUpdate()) { | 1410 if (CanAutorestartForUpdate()) { |
1416 DLOG(WARNING) << "Detected update. Restarting browser."; | 1411 DLOG(WARNING) << "Detected update. Restarting browser."; |
1417 RestartBackgroundInstance(); | 1412 RestartBackgroundInstance(); |
1418 } | 1413 } |
1419 } | 1414 } |
1420 | 1415 |
1421 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1416 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |