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

Side by Side Diff: chrome/browser/ui/webui/offline/offline_internals_ui.cc

Issue 2590793004: MD Downloads: gzip vulcanized resources via compress="gzip" (Closed)
Patch Set: . Created 3 years, 12 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 html_source->UseGzip(std::unordered_set<std::string>());
32 32
33 Profile* profile = Profile::FromWebUI(web_ui); 33 Profile* profile = Profile::FromWebUI(web_ui);
34 html_source->AddBoolean("isIncognito", profile->IsOffTheRecord()); 34 html_source->AddBoolean("isIncognito", profile->IsOffTheRecord());
35 35
36 content::WebUIDataSource::Add(profile, html_source); 36 content::WebUIDataSource::Add(profile, html_source);
37 37
38 web_ui->AddMessageHandler( 38 web_ui->AddMessageHandler(
39 new offline_internals::OfflineInternalsUIMessageHandler()); 39 new offline_internals::OfflineInternalsUIMessageHandler());
40 } 40 }
41 41
42 OfflineInternalsUI::~OfflineInternalsUI() {} 42 OfflineInternalsUI::~OfflineInternalsUI() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698