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

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: Small fix. 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
« no previous file with comments | « content/public/common/url_constants.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fbfb5a5c5ab1daa06ba98dffd5ddb8f44c47a05e 100644
--- a/extensions/browser/extension_web_contents_observer.cc
+++ b/extensions/browser/extension_web_contents_observer.cc
@@ -75,19 +75,7 @@ void ExtensionWebContentsObserver::RenderViewCreated(
if (!extension)
return;
- 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.
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);
- }
// Some extensions use file:// URLs.
if (type == Manifest::TYPE_EXTENSION ||
@@ -95,7 +83,7 @@ void ExtensionWebContentsObserver::RenderViewCreated(
ExtensionPrefs* prefs = ExtensionPrefs::Get(browser_context_);
if (prefs->AllowFileAccess(extension->id())) {
content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
- process->GetID(), url::kFileScheme);
+ render_view_host->GetProcess()->GetID(), url::kFileScheme);
}
}
« no previous file with comments | « content/public/common/url_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698