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

Side by Side Diff: chrome/browser/ui/webui/supervised_user_internals_ui.cc

Issue 2268183003: Mark chrome://supervised-user-internals as gzipped so it decodes correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/supervised_user_internals_ui.h" 5 #include "chrome/browser/ui/webui/supervised_user_internals_ui.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/webui/supervised_user_internals_message_handler.h" 8 #include "chrome/browser/ui/webui/supervised_user_internals_message_handler.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/web_ui.h" 10 #include "content/public/browser/web_ui.h"
11 #include "content/public/browser/web_ui_data_source.h" 11 #include "content/public/browser/web_ui_data_source.h"
12 #include "grit/browser_resources.h" 12 #include "grit/browser_resources.h"
13 13
14 namespace { 14 namespace {
15 15
16 content::WebUIDataSource* CreateSupervisedUserInternalsHTMLSource() { 16 content::WebUIDataSource* CreateSupervisedUserInternalsHTMLSource() {
17 content::WebUIDataSource* source = content::WebUIDataSource::Create( 17 content::WebUIDataSource* source = content::WebUIDataSource::Create(
18 chrome::kChromeUISupervisedUserInternalsHost); 18 chrome::kChromeUISupervisedUserInternalsHost);
19 19
20 source->AddResourcePath("supervised_user_internals.js", 20 source->AddResourcePath("supervised_user_internals.js",
21 IDR_SUPERVISED_USER_INTERNALS_JS); 21 IDR_SUPERVISED_USER_INTERNALS_JS);
22 source->AddResourcePath("supervised_user_internals.css", 22 source->AddResourcePath("supervised_user_internals.css",
23 IDR_SUPERVISED_USER_INTERNALS_CSS); 23 IDR_SUPERVISED_USER_INTERNALS_CSS);
24 source->SetDefaultResource(IDR_SUPERVISED_USER_INTERNALS_HTML); 24 source->SetDefaultResource(IDR_SUPERVISED_USER_INTERNALS_HTML);
25 source->DisableI18nAndUseGzipForAllPaths();
25 return source; 26 return source;
26 } 27 }
27 28
28 } // namespace 29 } // namespace
29 30
30 SupervisedUserInternalsUI::SupervisedUserInternalsUI(content::WebUI* web_ui) 31 SupervisedUserInternalsUI::SupervisedUserInternalsUI(content::WebUI* web_ui)
31 : WebUIController(web_ui) { 32 : WebUIController(web_ui) {
32 Profile* profile = Profile::FromWebUI(web_ui); 33 Profile* profile = Profile::FromWebUI(web_ui);
33 content::WebUIDataSource::Add(profile, 34 content::WebUIDataSource::Add(profile,
34 CreateSupervisedUserInternalsHTMLSource()); 35 CreateSupervisedUserInternalsHTMLSource());
35 36
36 web_ui->AddMessageHandler(new SupervisedUserInternalsMessageHandler); 37 web_ui->AddMessageHandler(new SupervisedUserInternalsMessageHandler);
37 } 38 }
38 39
39 SupervisedUserInternalsUI::~SupervisedUserInternalsUI() {} 40 SupervisedUserInternalsUI::~SupervisedUserInternalsUI() {}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698