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

Unified Diff: content/browser/accessibility/accessibility_ui.cc

Issue 2399553002: Gzip compress chrome://accessibility resources (Closed)
Patch Set: asdf 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
« no previous file with comments | « no previous file | content/browser/webui/web_ui_data_source_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/accessibility_ui.cc
diff --git a/content/browser/accessibility/accessibility_ui.cc b/content/browser/accessibility/accessibility_ui.cc
index cf0db1142dd83d221b3149888007ff144c90a40f..20f041767eeb25c41d39d559bb4e07836e67f354 100644
--- a/content/browser/accessibility/accessibility_ui.cc
+++ b/content/browser/accessibility/accessibility_ui.cc
@@ -19,6 +19,7 @@
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/browser/webui/web_ui_data_source_impl.h"
#include "content/common/view_message_enums.h"
#include "content/grit/content_resources.h"
#include "content/public/browser/favicon_status.h"
@@ -142,8 +143,8 @@ bool HandleRequestCallback(BrowserContext* current_context,
AccessibilityUI::AccessibilityUI(WebUI* web_ui) : WebUIController(web_ui) {
// Set up the chrome://accessibility source.
- WebUIDataSource* html_source =
- WebUIDataSource::Create(kChromeUIAccessibilityHost);
+ WebUIDataSourceImpl* html_source = static_cast<WebUIDataSourceImpl*>(
+ WebUIDataSource::Create(kChromeUIAccessibilityHost));
web_ui->RegisterMessageCallback(
"toggleAccessibility",
@@ -170,6 +171,8 @@ AccessibilityUI::AccessibilityUI(WebUI* web_ui) : WebUIController(web_ui) {
html_source->SetRequestFilter(
base::Bind(&HandleRequestCallback,
web_ui->GetWebContents()->GetBrowserContext()));
+ html_source->DisableI18nAndUseGzipForAllPaths();
+ html_source->ExcludePathFromGzip(kDataFile);
BrowserContext* browser_context =
web_ui->GetWebContents()->GetBrowserContext();
« no previous file with comments | « no previous file | content/browser/webui/web_ui_data_source_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698