| Index: extensions/browser/process_manager.cc
|
| diff --git a/extensions/browser/process_manager.cc b/extensions/browser/process_manager.cc
|
| index 2146969106028018a415d13792e5122da024664f..274fb9b96a8e9cd0b6b8821d7c11ac43f2c863e8 100644
|
| --- a/extensions/browser/process_manager.cc
|
| +++ b/extensions/browser/process_manager.cc
|
| @@ -34,6 +34,7 @@
|
| #include "extensions/browser/extension_system.h"
|
| #include "extensions/browser/extensions_browser_client.h"
|
| #include "extensions/browser/view_type_utils.h"
|
| +#include "extensions/common/constants.h"
|
| #include "extensions/common/extension.h"
|
| #include "extensions/common/extension_messages.h"
|
| #include "extensions/common/manifest_handlers/background_info.h"
|
| @@ -58,11 +59,15 @@ namespace {
|
|
|
| std::string GetExtensionID(RenderViewHost* render_view_host) {
|
| // This works for both apps and extensions because the site has been
|
| - // normalized to the extension URL for apps.
|
| - if (!render_view_host->GetSiteInstance())
|
| + // normalized to the extension URL for hosted apps.
|
| + content::SiteInstance* site_instance = render_view_host->GetSiteInstance();
|
| + if (!site_instance)
|
| + return std::string();
|
| +
|
| + if (!site_instance->GetSiteURL().SchemeIs(kExtensionScheme))
|
| return std::string();
|
|
|
| - return render_view_host->GetSiteInstance()->GetSiteURL().host();
|
| + return site_instance->GetSiteURL().host();
|
| }
|
|
|
| std::string GetExtensionIDFromFrame(
|
|
|