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

Side by Side Diff: chrome/browser/ui/webui/engagement/site_engagement_ui.cc

Issue 2388303005: gzip compress more chrome:// pages (Closed)
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chrome/browser/ui/webui/engagement/site_engagement_ui.h" 5 #include "chrome/browser/ui/webui/engagement/site_engagement_ui.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 : MojoWebUIController<mojom::SiteEngagementUIHandler>(web_ui) { 78 : MojoWebUIController<mojom::SiteEngagementUIHandler>(web_ui) {
79 // Set up the chrome://site-engagement/ source. 79 // Set up the chrome://site-engagement/ source.
80 std::unique_ptr<content::WebUIDataSource> source( 80 std::unique_ptr<content::WebUIDataSource> source(
81 content::WebUIDataSource::Create(chrome::kChromeUISiteEngagementHost)); 81 content::WebUIDataSource::Create(chrome::kChromeUISiteEngagementHost));
82 source->AddResourcePath("site_engagement.js", IDR_SITE_ENGAGEMENT_JS); 82 source->AddResourcePath("site_engagement.js", IDR_SITE_ENGAGEMENT_JS);
83 source->AddResourcePath( 83 source->AddResourcePath(
84 "chrome/browser/ui/webui/engagement/site_engagement.mojom", 84 "chrome/browser/ui/webui/engagement/site_engagement.mojom",
85 IDR_SITE_ENGAGEMENT_MOJO_JS); 85 IDR_SITE_ENGAGEMENT_MOJO_JS);
86 source->AddResourcePath("url/mojo/url.mojom", IDR_URL_MOJO_JS); 86 source->AddResourcePath("url/mojo/url.mojom", IDR_URL_MOJO_JS);
87 source->SetDefaultResource(IDR_SITE_ENGAGEMENT_HTML); 87 source->SetDefaultResource(IDR_SITE_ENGAGEMENT_HTML);
88 source->DisableI18nAndUseGzipForAllPaths();
88 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source.release()); 89 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source.release());
89 } 90 }
90 91
91 SiteEngagementUI::~SiteEngagementUI() {} 92 SiteEngagementUI::~SiteEngagementUI() {}
92 93
93 void SiteEngagementUI::BindUIHandler( 94 void SiteEngagementUI::BindUIHandler(
94 mojo::InterfaceRequest<mojom::SiteEngagementUIHandler> request) { 95 mojo::InterfaceRequest<mojom::SiteEngagementUIHandler> request) {
95 ui_handler_.reset(new SiteEngagementUIHandlerImpl( 96 ui_handler_.reset(new SiteEngagementUIHandlerImpl(
96 Profile::FromWebUI(web_ui()), std::move(request))); 97 Profile::FromWebUI(web_ui()), std::move(request)));
97 } 98 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.cc ('k') | chrome/browser/ui/webui/invalidations_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698