Chromium Code Reviews| Index: extensions/browser/api/web_request/web_request_api.cc |
| diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc |
| index 0aaa4fad49fdd99661c424b454038001ed5c9ec3..032108eab4f52620dfd524ba4bdfd54ac897e76a 100644 |
| --- a/extensions/browser/api/web_request/web_request_api.cc |
| +++ b/extensions/browser/api/web_request/web_request_api.cc |
| @@ -159,7 +159,20 @@ bool IsRequestFromExtension(const net::URLRequest* request, |
| if (!info) |
| return false; |
| - return extension_info_map->process_map().Contains(info->GetChildID()); |
| + const std::set<std::string> extension_ids = |
|
not at google - send to devlin
2015/09/08 17:33:00
btw for clarity between "extension IDs in process"
|
| + extension_info_map->process_map().GetExtensionsInProcess( |
| + info->GetChildID()); |
| + if (extension_ids.empty()) |
| + return false; |
| + |
| + // Treat hosted apps as normal web pages (crbug.com/526413). |
| + for (const std::string& extension_id : extension_ids) { |
| + const Extension* extension = |
| + extension_info_map->extensions().GetByID(extension_id); |
| + if (extension && !extension->is_hosted_app()) |
| + return true; |
| + } |
| + return false; |
| } |
| void ExtractRequestRoutingInfo(const net::URLRequest* request, |