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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 | 290 |
291 // TODO(guohui): needs to forward the new-profile-management switch to | 291 // TODO(guohui): needs to forward the new-profile-management switch to |
292 // renderer processes. | 292 // renderer processes. |
293 if (switches::IsNewProfileManagement()) | 293 if (switches::IsNewProfileManagement()) |
294 thread->RegisterExtension(extensions_v8::PrincipalsExtension::Get()); | 294 thread->RegisterExtension(extensions_v8::PrincipalsExtension::Get()); |
295 | 295 |
296 // chrome:, chrome-search:, chrome-devtools:, and chrome-distiller: pages | 296 // chrome:, chrome-search:, chrome-devtools:, and chrome-distiller: pages |
297 // should not be accessible by normal content, and should also be unable to | 297 // should not be accessible by normal content, and should also be unable to |
298 // script anything but themselves (to help limit the damage that a corrupt | 298 // script anything but themselves (to help limit the damage that a corrupt |
299 // page could cause). | 299 // page could cause). |
300 WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme)); | 300 WebString chrome_ui_scheme(ASCIIToUTF16(content::kChromeUIScheme)); |
301 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme); | 301 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme); |
302 | 302 |
303 WebString chrome_search_scheme(ASCIIToUTF16(chrome::kChromeSearchScheme)); | 303 WebString chrome_search_scheme(ASCIIToUTF16(chrome::kChromeSearchScheme)); |
304 // The Instant process can only display the content but not read it. Other | 304 // The Instant process can only display the content but not read it. Other |
305 // processes can't display it or read it. | 305 // processes can't display it or read it. |
306 if (!command_line->HasSwitch(switches::kInstantProcess)) | 306 if (!command_line->HasSwitch(switches::kInstantProcess)) |
307 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_search_scheme); | 307 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_search_scheme); |
308 | 308 |
309 WebString dev_tools_scheme(ASCIIToUTF16(chrome::kChromeDevToolsScheme)); | 309 WebString dev_tools_scheme(ASCIIToUTF16(chrome::kChromeDevToolsScheme)); |
310 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dev_tools_scheme); | 310 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dev_tools_scheme); |
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1417 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
1418 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); | 1418 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); |
1419 } | 1419 } |
1420 | 1420 |
1421 blink::WebWorkerPermissionClientProxy* | 1421 blink::WebWorkerPermissionClientProxy* |
1422 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( | 1422 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( |
1423 content::RenderFrame* render_frame, | 1423 content::RenderFrame* render_frame, |
1424 blink::WebFrame* frame) { | 1424 blink::WebFrame* frame) { |
1425 return new WorkerPermissionClientProxy(render_frame, frame); | 1425 return new WorkerPermissionClientProxy(render_frame, frame); |
1426 } | 1426 } |
OLD | NEW |