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

Side by Side Diff: content/public/browser/url_data_source.h

Issue 2255833003: DO NOT COMMIT: hack hack hacking on preloading md-settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: to show dave Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
6 #define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ 6 #define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector>
9 10
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
13 14
14 namespace base { 15 namespace base {
15 class MessageLoop; 16 class MessageLoop;
16 class RefCountedMemory; 17 class RefCountedMemory;
17 } 18 }
18 19
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 virtual std::string GetContentSecurityPolicyChildSrc() const; 112 virtual std::string GetContentSecurityPolicyChildSrc() const;
112 // By default empty. Override to change this. 113 // By default empty. Override to change this.
113 virtual std::string GetContentSecurityPolicyStyleSrc() const; 114 virtual std::string GetContentSecurityPolicyStyleSrc() const;
114 // By default empty. Override to change this. 115 // By default empty. Override to change this.
115 virtual std::string GetContentSecurityPolicyImgSrc() const; 116 virtual std::string GetContentSecurityPolicyImgSrc() const;
116 117
117 // By default, the "X-Frame-Options: DENY" header is sent. To stop this from 118 // By default, the "X-Frame-Options: DENY" header is sent. To stop this from
118 // happening, return false. It is OK to return false as needed. 119 // happening, return false. It is OK to return false as needed.
119 virtual bool ShouldDenyXFrameOptions() const; 120 virtual bool ShouldDenyXFrameOptions() const;
120 121
122 virtual std::vector<std::string> GetPreloadHeaders() const;
123
121 // By default, only chrome: and chrome-devtools: requests are allowed. 124 // By default, only chrome: and chrome-devtools: requests are allowed.
122 // Override in specific WebUI data sources to enable for additional schemes or 125 // Override in specific WebUI data sources to enable for additional schemes or
123 // to implement fancier access control. Typically used in concert with 126 // to implement fancier access control. Typically used in concert with
124 // ContentBrowserClient::GetAdditionalWebUISchemes() to permit additional 127 // ContentBrowserClient::GetAdditionalWebUISchemes() to permit additional
125 // WebUI scheme support for an embedder. 128 // WebUI scheme support for an embedder.
126 virtual bool ShouldServiceRequest(const net::URLRequest* request) const; 129 virtual bool ShouldServiceRequest(const net::URLRequest* request) const;
127 130
128 // By default, Content-Type: header is not sent along with the response. 131 // By default, Content-Type: header is not sent along with the response.
129 // To start sending mime type returned by GetMimeType in HTTP headers, 132 // To start sending mime type returned by GetMimeType in HTTP headers,
130 // return true. It is useful when tunneling response served from this data 133 // return true. It is useful when tunneling response served from this data
(...skipping 14 matching lines...) Expand all
145 // Gives the source an opportunity to rewrite |path| to incorporate extra 148 // Gives the source an opportunity to rewrite |path| to incorporate extra
146 // information from the URLRequest prior to serving. 149 // information from the URLRequest prior to serving.
147 virtual void WillServiceRequest( 150 virtual void WillServiceRequest(
148 const net::URLRequest* request, 151 const net::URLRequest* request,
149 std::string* path) const {} 152 std::string* path) const {}
150 }; 153 };
151 154
152 } // namespace content 155 } // namespace content
153 156
154 #endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ 157 #endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_data_source_impl.cc ('k') | content/public/browser/url_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698