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

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

Issue 2399553002: Gzip compress chrome://accessibility resources (Closed)
Patch Set: Created 4 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
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 5b258e359b3472cc3976cf05e2074a22a0f1f65c..f423dfe7af861ed2bd29b3d6703d774709d46d4e 100644
--- a/content/browser/webui/web_ui_data_source_impl.cc
+++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -73,9 +73,7 @@ class WebUIDataSourceImpl::InternalDataSource : public URLDataSource {
return parent_->deny_xframe_options_;
}
bool IsGzipped(const std::string& path) const override {
- if (!parent_->json_path_.empty() && path == parent_->json_path_)
- return false;
- return parent_->use_gzip_for_all_paths_;
+ return parent_->IsGzipped(path);
}
private:
@@ -187,6 +185,12 @@ void WebUIDataSourceImpl::DisableI18nAndUseGzipForAllPaths() {
use_gzip_for_all_paths_ = true;
}
+bool WebUIDataSourceImpl::IsGzipped(const std::string& path) const {
+ if (!json_path_.empty() && path == json_path_)
+ return false;
+ return use_gzip_for_all_paths_;
+}
+
std::string WebUIDataSourceImpl::GetSource() const {
return source_name_;
}

Powered by Google App Engine
This is Rietveld 408576698