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

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

Issue 2152143002: Compress chrome://history's resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compress-webui
Patch Set: . Created 4 years, 3 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 | « chrome/browser/browser_resources.grd ('k') | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/history_ui.h" 5 #include "chrome/browser/ui/webui/history_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 search::IsInstantExtendedAPIEnabled()); 158 search::IsInstantExtendedAPIEnabled());
159 source->AddBoolean("isSupervisedProfile", profile->IsSupervised()); 159 source->AddBoolean("isSupervisedProfile", profile->IsSupervised());
160 source->AddBoolean("hideDeleteVisitUI", 160 source->AddBoolean("hideDeleteVisitUI",
161 profile->IsSupervised() && !allow_deleting_history); 161 profile->IsSupervised() && !allow_deleting_history);
162 162
163 source->SetJsonPath(kStringsJsFile); 163 source->SetJsonPath(kStringsJsFile);
164 source->AddResourcePath(kHistoryJsFile, IDR_HISTORY_JS); 164 source->AddResourcePath(kHistoryJsFile, IDR_HISTORY_JS);
165 source->AddResourcePath(kOtherDevicesJsFile, IDR_OTHER_DEVICES_JS); 165 source->AddResourcePath(kOtherDevicesJsFile, IDR_OTHER_DEVICES_JS);
166 source->SetDefaultResource(IDR_HISTORY_HTML); 166 source->SetDefaultResource(IDR_HISTORY_HTML);
167 source->DisableDenyXFrameOptions(); 167 source->DisableDenyXFrameOptions();
168 source->DisableI18nAndUseGzipForAllPaths();
168 169
169 return source; 170 return source;
170 } 171 }
171 172
172 } // namespace 173 } // namespace
173 174
174 HistoryUI::HistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) { 175 HistoryUI::HistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) {
175 web_ui->AddMessageHandler(new BrowsingHistoryHandler()); 176 web_ui->AddMessageHandler(new BrowsingHistoryHandler());
176 web_ui->AddMessageHandler(new MetricsHandler()); 177 web_ui->AddMessageHandler(new MetricsHandler());
177 178
(...skipping 25 matching lines...) Expand all
203 } 204 }
204 205
205 HistoryUI::~HistoryUI() {} 206 HistoryUI::~HistoryUI() {}
206 207
207 // static 208 // static
208 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes( 209 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes(
209 ui::ScaleFactor scale_factor) { 210 ui::ScaleFactor scale_factor) {
210 return ResourceBundle::GetSharedInstance(). 211 return ResourceBundle::GetSharedInstance().
211 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor); 212 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor);
212 } 213 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698