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

Unified Diff: content/common/cross_site_document_classifier.h

Issue 2568133007: Allow CrossSiteDocumentClassifier to operate on Origins (Closed)
Patch Set: pkasting review Created 3 years, 11 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
« no previous file with comments | « content/child/site_isolation_stats_gatherer.cc ('k') | content/common/cross_site_document_classifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/cross_site_document_classifier.h
diff --git a/content/common/cross_site_document_classifier.h b/content/common/cross_site_document_classifier.h
index e32ee52f113e5dfa45a3562f8470a7e18755a7d0..5c9bafe24ecf1074633059dd64806fc0d3dfe49f 100644
--- a/content/common/cross_site_document_classifier.h
+++ b/content/common/cross_site_document_classifier.h
@@ -9,6 +9,7 @@
#include "base/strings/string_piece.h"
#include "content/common/content_export.h"
#include "url/gurl.h"
+#include "url/origin.h"
namespace content {
@@ -40,7 +41,8 @@ class CONTENT_EXPORT CrossSiteDocumentClassifier {
static bool IsBlockableScheme(const GURL& frame_origin);
// Returns whether the two urls belong to the same sites.
- static bool IsSameSite(const GURL& frame_origin, const GURL& response_url);
+ static bool IsSameSite(const url::Origin& frame_origin,
+ const GURL& response_url);
// Returns whether there's a valid CORS header for frame_origin. This is
// simliar to CrossOriginAccessControl::passesAccessControlCheck(), but we use
@@ -50,7 +52,7 @@ class CONTENT_EXPORT CrossSiteDocumentClassifier {
// not allowed by actual CORS rules by ignoring 1) credentials and 2)
// methods. Preflight requests don't matter here since they are not used to
// decide whether to block a document or not on the client side.
- static bool IsValidCorsHeaderSet(const GURL& frame_origin,
+ static bool IsValidCorsHeaderSet(const url::Origin& frame_origin,
const GURL& website_origin,
const std::string& access_control_origin);
« no previous file with comments | « content/child/site_isolation_stats_gatherer.cc ('k') | content/common/cross_site_document_classifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698