Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 2364633004: Lock down the registration of blob:chrome-extension:// URLs (Closed)
Patch Set: Pare down CL Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 print_job_manager_.reset(new printing::PrintJobManager); 213 print_job_manager_.reset(new printing::PrintJobManager);
214 #endif 214 #endif
215 215
216 base::FilePath net_log_path; 216 base::FilePath net_log_path;
217 if (command_line.HasSwitch(switches::kLogNetLog)) 217 if (command_line.HasSwitch(switches::kLogNetLog))
218 net_log_path = command_line.GetSwitchValuePath(switches::kLogNetLog); 218 net_log_path = command_line.GetSwitchValuePath(switches::kLogNetLog);
219 net_log_.reset(new net_log::ChromeNetLog( 219 net_log_.reset(new net_log::ChromeNetLog(
220 net_log_path, GetNetCaptureModeFromCommandLine(command_line), 220 net_log_path, GetNetCaptureModeFromCommandLine(command_line),
221 command_line.GetCommandLineString(), chrome::GetChannelString())); 221 command_line.GetCommandLineString(), chrome::GetChannelString()));
222 222
223 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( 223 // chrome-extension:// URLs are safe to request anywhere, but may only
224 // commit (including in iframes) in extension processes.
Charlie Reis 2016/09/28 22:07:16 Sanity check: Will this affect DevTools extensions
ncarter (slow) 2016/09/29 21:01:45 Excellent catch. This was a real bug; I've fixed i
225 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeIsolatedScheme(
224 extensions::kExtensionScheme); 226 extensions::kExtensionScheme);
225 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( 227 // TODO(nick): Kill off kExtensionResourceScheme.
228 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeIsolatedScheme(
226 extensions::kExtensionResourceScheme); 229 extensions::kExtensionResourceScheme);
227 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( 230 ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme(
228 chrome::kChromeSearchScheme); 231 chrome::kChromeSearchScheme);
229 232
230 #if defined(OS_MACOSX) 233 #if defined(OS_MACOSX)
231 ui::InitIdleMonitor(); 234 ui::InitIdleMonitor();
232 #endif 235 #endif
233 236
234 device_client_.reset(new ChromeDeviceClient); 237 device_client_.reset(new ChromeDeviceClient);
235 238
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 } 1348 }
1346 1349
1347 void BrowserProcessImpl::OnAutoupdateTimer() { 1350 void BrowserProcessImpl::OnAutoupdateTimer() {
1348 if (CanAutorestartForUpdate()) { 1351 if (CanAutorestartForUpdate()) {
1349 DLOG(WARNING) << "Detected update. Restarting browser."; 1352 DLOG(WARNING) << "Detected update. Restarting browser.";
1350 RestartBackgroundInstance(); 1353 RestartBackgroundInstance();
1351 } 1354 }
1352 } 1355 }
1353 1356
1354 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1357 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698