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

Side by Side Diff: chrome/browser/ui/webui/offline/offline_internals_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/offline/offline_internals_ui.h" 5 #include "chrome/browser/ui/webui/offline/offline_internals_ui.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.h " 9 #include "chrome/browser/ui/webui/offline/offline_internals_ui_message_handler.h "
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // Required resources. 22 // Required resources.
23 html_source->SetJsonPath("strings.js"); 23 html_source->SetJsonPath("strings.js");
24 html_source->AddResourcePath("offline_internals.css", 24 html_source->AddResourcePath("offline_internals.css",
25 IDR_OFFLINE_INTERNALS_CSS); 25 IDR_OFFLINE_INTERNALS_CSS);
26 html_source->AddResourcePath("offline_internals.js", 26 html_source->AddResourcePath("offline_internals.js",
27 IDR_OFFLINE_INTERNALS_JS); 27 IDR_OFFLINE_INTERNALS_JS);
28 html_source->AddResourcePath("offline_internals_browser_proxy.js", 28 html_source->AddResourcePath("offline_internals_browser_proxy.js",
29 IDR_OFFLINE_INTERNALS_BROWSER_PROXY_JS); 29 IDR_OFFLINE_INTERNALS_BROWSER_PROXY_JS);
30 html_source->SetDefaultResource(IDR_OFFLINE_INTERNALS_HTML); 30 html_source->SetDefaultResource(IDR_OFFLINE_INTERNALS_HTML);
31 html_source->DisableI18nAndUseGzipForAllPaths();
31 32
32 Profile* profile = Profile::FromWebUI(web_ui); 33 Profile* profile = Profile::FromWebUI(web_ui);
33 html_source->AddBoolean("isIncognito", profile->IsOffTheRecord()); 34 html_source->AddBoolean("isIncognito", profile->IsOffTheRecord());
34 35
35 content::WebUIDataSource::Add(profile, html_source); 36 content::WebUIDataSource::Add(profile, html_source);
36 37
37 web_ui->AddMessageHandler( 38 web_ui->AddMessageHandler(
38 new offline_internals::OfflineInternalsUIMessageHandler()); 39 new offline_internals::OfflineInternalsUIMessageHandler());
39 } 40 }
40 41
41 OfflineInternalsUI::~OfflineInternalsUI() {} 42 OfflineInternalsUI::~OfflineInternalsUI() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/invalidations_ui.cc ('k') | chrome/browser/ui/webui/predictors/predictors_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698