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

Unified Diff: chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc

Issue 2803963002: Don't kill Chrome Apps that make XHRs from guests. (Closed)
Patch Set: Created 3 years, 8 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
Index: chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
diff --git a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
index 6bf45963aa2b568c9e7217d0440f37e4599cdb8b..b24d804cd553b4fae70e9d903e822226f4048343 100644
--- a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
+++ b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
@@ -207,9 +207,10 @@ content::HeaderInterceptorResult CheckOriginHeader(
const ProcessMap& process_map = extension_info_map->process_map();
if (extension->is_platform_app() &&
!process_map.Contains(extension->id(), child_id)) {
- // This is a platform app origin not in the app's own process. If there
- // are no accessible resources, this is illegal.
- if (!extension->GetManifestData(manifest_keys::kWebviewAccessibleResources))
+ // This is a platform app origin not in the app's own process. If it cannot
+ // create webviews, this is illegal.
+ if (!extension->permissions_data()->HasAPIPermission(
+ extensions::APIPermission::kWebView))
ncarter (slow) 2017/04/06 17:16:44 Do we actually need this check, or would just chec
Charlie Reis 2017/04/06 18:15:46 In theory, the check below that you mention would
return content::HeaderInterceptorResult::KILL;
// If there are accessible resources, the origin is only legal if the

Powered by Google App Engine
This is Rietveld 408576698