Chromium Code Reviews| 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( |
|
Charlie Reis
2014/10/06 19:43:20
This looks like it is only used within content/, s
dzhioev (left Google)
2014/10/08 18:41:38
We can't override this method in SharedResourceDat
Charlie Reis
2014/10/08 20:46:24
It would work if there were an impl class that Sha
|
| + 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. |