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

Unified Diff: content/public/browser/url_data_source.h

Issue 613733002: Enabled CORS for chrome://resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge conflict resolved (OVERRIDE->override). Created 6 years, 2 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/browser/webui/url_data_manager_backend.cc ('k') | content/public/browser/url_data_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/url_data_source.h
diff --git a/content/public/browser/url_data_source.h b/content/public/browser/url_data_source.h
index 33c185b63b87b5b8670f19f0590caad81eceefef..9230360721f4e8481dfbcd9b384eab6953710b3c 100644
--- a/content/public/browser/url_data_source.h
+++ b/content/public/browser/url_data_source.h
@@ -119,6 +119,15 @@ class CONTENT_EXPORT URLDataSource {
// is for chrome-devtools.
virtual bool ShouldServeMimeTypeAsContentTypeHeader() const;
+ // This method is called when the request contains "Origin:" header. The value
+ // of the header is passed in |origin| parameter. If the returned value is not
+ // empty, it is used as a value for "Access-Control-Allow-Origin:" response
+ // header, otherwise the header is not set. This method should return either
+ // |origin|, or "*", or "none", or empty string.
+ // Default implementation returns an empty string.
+ virtual std::string GetAccessControlAllowOriginForOrigin(
+ const std::string& origin) const;
+
// Called to inform the source that StartDataRequest() will be called soon.
// Gives the source an opportunity to rewrite |path| to incorporate extra
// information from the URLRequest prior to serving.
« no previous file with comments | « content/browser/webui/url_data_manager_backend.cc ('k') | content/public/browser/url_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698