| Index: chrome/browser/chrome_content_browser_client.cc
|
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
| index d811568fd75ec341187cc5f13ce896f05f9a26e0..e1baeadcb645322fea9943bd25aafba467677ac7 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -45,14 +45,12 @@
|
| #include "chrome/common/child_process_logging.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/extensions/extension.h"
|
| -#include "chrome/common/extensions/extension_messages.h"
|
| #include "chrome/common/logging_chrome.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "chrome/common/render_messages.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "content/browser/browser_url_handler.h"
|
| #include "content/browser/browsing_instance.h"
|
| -#include "content/browser/child_process_security_policy.h"
|
| #include "content/browser/debugger/devtools_handler.h"
|
| #include "content/browser/plugin_process_host.h"
|
| #include "content/browser/renderer_host/browser_render_process_host.h"
|
| @@ -109,37 +107,19 @@ void InitRenderViewHostForExtensions(RenderViewHost* render_view_host) {
|
|
|
| // Register the association between extension and SiteInstance with
|
| // ExtensionProcessManager.
|
| - // TODO(creis): Use this to replace SetInstalledAppForRenderer below.
|
| + // TODO(creis): Use this to replace SetInstalledAppForRenderer in
|
| + // ChromeRenderViewHostObserver::InitRenderViewHostForExtensions.
|
| process_manager->RegisterExtensionSiteInstance(site_instance->id(),
|
| extension->id());
|
|
|
| - RenderProcessHost* process = render_view_host->process();
|
| -
|
| - if (extension->is_app()) {
|
| - render_view_host->Send(
|
| - new ExtensionMsg_ActivateApplication(extension->id()));
|
| - // Record which, if any, installed app is associated with this process.
|
| - // TODO(aa): Totally lame to store this state in a global map in extension
|
| - // service. Can we get it from EPM instead?
|
| - service->SetInstalledAppForRenderer(process->id(), extension);
|
| - }
|
| -
|
| - // Some extensions use chrome:// URLs.
|
| - Extension::Type type = extension->GetType();
|
| - if (type == Extension::TYPE_EXTENSION ||
|
| - type == Extension::TYPE_PACKAGED_APP) {
|
| - ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
|
| - process->id(), chrome::kChromeUIScheme);
|
| - }
|
| -
|
| // Enable extension bindings for the renderer. Currently only extensions,
|
| // packaged apps, and hosted component apps use extension bindings.
|
| + Extension::Type type = extension->GetType();
|
| if (type == Extension::TYPE_EXTENSION ||
|
| type == Extension::TYPE_USER_SCRIPT ||
|
| type == Extension::TYPE_PACKAGED_APP ||
|
| (type == Extension::TYPE_HOSTED_APP &&
|
| extension->location() == Extension::COMPONENT)) {
|
| - render_view_host->Send(new ExtensionMsg_ActivateExtension(extension->id()));
|
| render_view_host->AllowBindings(BindingsPolicy::EXTENSION);
|
| }
|
| }
|
|
|