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); |
} |
} |