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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 105723002: Add the scheme chrome-distiller:// and hook up data source. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments from jam@ Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/url_constants.cc ('k') | components/dom_distiller.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 3e000ac0afb3ede2080e08cc572d53be38f01e98..5751a0dd1a4eec4f742356745fa7b5a4921ca78d 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -294,9 +294,10 @@ void ChromeContentRendererClient::RenderThreadStarted() {
if (switches::IsNewProfileManagement())
thread->RegisterExtension(extensions_v8::PrincipalsExtension::Get());
- // chrome:, chrome-search:, and chrome-devtools: pages should not be
- // accessible by normal content, and should also be unable to script anything
- // but themselves (to help limit the damage that a corrupt page could cause).
+ // chrome:, chrome-search:, chrome-devtools:, and chrome-distiller: pages
+ // should not be accessible by normal content, and should also be unable to
+ // script anything but themselves (to help limit the damage that a corrupt
+ // page could cause).
WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme));
WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme);
@@ -309,6 +310,10 @@ void ChromeContentRendererClient::RenderThreadStarted() {
WebString dev_tools_scheme(ASCIIToUTF16(chrome::kChromeDevToolsScheme));
WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dev_tools_scheme);
+ WebString dom_distiller_scheme(ASCIIToUTF16(chrome::kDomDistillerScheme));
+ // TODO(nyquist): Add test to ensure this happens when the flag is set.
+ WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(dom_distiller_scheme);
+
#if defined(OS_CHROMEOS)
WebString drive_scheme(ASCIIToUTF16(chrome::kDriveScheme));
WebSecurityPolicy::registerURLSchemeAsLocal(drive_scheme);
« no previous file with comments | « chrome/common/url_constants.cc ('k') | components/dom_distiller.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698