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

Unified Diff: extensions/browser/extension_web_contents_observer.cc

Issue 1362433002: Fix for "chrome://" links in PDFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
Index: extensions/browser/extension_web_contents_observer.cc
diff --git a/extensions/browser/extension_web_contents_observer.cc b/extensions/browser/extension_web_contents_observer.cc
index 187cfb22a95ead9a7d997d18aefe30ccd39cb71c..41c2dcfa1e62f5a74544472a0af3ccd771f256b7 100644
--- a/extensions/browser/extension_web_contents_observer.cc
+++ b/extensions/browser/extension_web_contents_observer.cc
@@ -77,19 +77,18 @@ void ExtensionWebContentsObserver::RenderViewCreated(
content::RenderProcessHost* process = render_view_host->GetProcess();
- // Some extensions use chrome:// URLs.
- // This is a temporary solution. Replace it with access to chrome-static://
- // once it is implemented. See: crbug.com/226927.
+ // Some extensions use "chrome://resources/" URLs.
Charlie Reis 2015/09/22 17:38:15 Again, I'm not sure why this is handled separately
paulmeyer 2015/09/22 22:13:57 See other comment. I'll move this out to the chrom
Manifest::Type type = extension->GetType();
if (type == Manifest::TYPE_EXTENSION ||
type == Manifest::TYPE_LEGACY_PACKAGED_APP ||
(type == Manifest::TYPE_PLATFORM_APP &&
extension->location() == Manifest::COMPONENT)) {
- content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
- process->GetID(), content::kChromeUIScheme);
+ content::ChildProcessSecurityPolicy::GetInstance()->GrantSchemeHost(
+ process->GetID(), content::kChromeUIScheme,
+ content::kChromeUIResourcesHost);
}
- // Some extensions use file:// URLs.
+ // Some extensions use "file://" URLs.
Charlie Reis 2015/09/22 17:38:15 nit: No need for quotes (or churn on this line).
paulmeyer 2015/09/22 22:13:57 Done.
if (type == Manifest::TYPE_EXTENSION ||
type == Manifest::TYPE_LEGACY_PACKAGED_APP) {
ExtensionPrefs* prefs = ExtensionPrefs::Get(browser_context_);

Powered by Google App Engine
This is Rietveld 408576698