| 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 7d8847cf0e3ff9853bbd999934e6c9a768b17e98..fbb8eaf6ea50d9195b307397d6b2bc8e9e79b415 100644
|
| --- a/content/public/browser/url_data_source.h
|
| +++ b/content/public/browser/url_data_source.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_DELEGATE_H_
|
| -#define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_DELEGATE_H_
|
| +#ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
|
| +#define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
|
|
|
| #include <string>
|
|
|
| @@ -16,6 +16,10 @@ namespace base {
|
| class RefCountedMemory;
|
| }
|
|
|
| +namespace net {
|
| +class URLRequest;
|
| +}
|
| +
|
| namespace content {
|
| class BrowserContext;
|
|
|
| @@ -95,8 +99,13 @@ class CONTENT_EXPORT URLDataSource {
|
| // By default, the "X-Frame-Options: DENY" header is sent. To stop this from
|
| // happening, return false. It is OK to return false as needed.
|
| virtual bool ShouldDenyXFrameOptions() const;
|
| +
|
| + // By default, only chrome: and chrome-devtools: requests are allowed.
|
| + // Override in specific data sources to enable for additional schemes or to
|
| + // implement fancier access control.
|
| + virtual bool ShouldServiceRequest(const net::URLRequest* request) const;
|
| };
|
|
|
| } // namespace content
|
|
|
| -#endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_DELEGATE_H_
|
| +#endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
|
|
|