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

Unified Diff: content/browser/webui/web_ui_data_source_impl.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/webui/web_ui_data_source_impl.h ('k') | content/public/browser/url_data_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/web_ui_data_source_impl.cc
diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc
index 2c091282f99918187a41a59babd6507155453749..b3f2f7674d040cf9feb1e720ea1d1a55ea33d2a4 100644
--- a/content/browser/webui/web_ui_data_source_impl.cc
+++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -74,6 +74,9 @@ class WebUIDataSourceImpl::InternalDataSource : public URLDataSource {
bool ShouldDenyXFrameOptions() const override {
return parent_->deny_xframe_options_;
}
+ std::vector<std::string> GetPreloadHeaders() const override {
+ return parent_->preload_headers_;
+ }
private:
WebUIDataSourceImpl* parent_;
@@ -155,6 +158,10 @@ void WebUIDataSourceImpl::SetRequestFilter(
filter_callback_ = callback;
}
+void WebUIDataSourceImpl::AddPreloadHeader(const std::string& preload_header) {
+ preload_headers_.push_back(preload_header);
+}
+
void WebUIDataSourceImpl::DisableReplaceExistingSource() {
replace_existing_source_ = false;
}
@@ -179,6 +186,10 @@ void WebUIDataSourceImpl::DisableDenyXFrameOptions() {
deny_xframe_options_ = false;
}
+const std::map<std::string, int>& WebUIDataSourceImpl::path_to_idr_map() const {
+ return path_to_idr_map_;
+}
+
std::string WebUIDataSourceImpl::GetSource() const {
return source_name_;
}
« no previous file with comments | « content/browser/webui/web_ui_data_source_impl.h ('k') | content/public/browser/url_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698