OLD | NEW |
---|---|
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/md_history_ui.h" | 5 #include "chrome/browser/ui/webui/md_history_ui.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 | 143 |
144 source->AddResourcePath("constants.html", IDR_MD_HISTORY_CONSTANTS_HTML); | 144 source->AddResourcePath("constants.html", IDR_MD_HISTORY_CONSTANTS_HTML); |
145 source->AddResourcePath("constants.js", IDR_MD_HISTORY_CONSTANTS_JS); | 145 source->AddResourcePath("constants.js", IDR_MD_HISTORY_CONSTANTS_JS); |
146 source->AddResourcePath("images/100/sign_in_promo.jpg", | 146 source->AddResourcePath("images/100/sign_in_promo.jpg", |
147 IDR_MD_HISTORY_IMAGES_100_SIGN_IN_PROMO_JPG); | 147 IDR_MD_HISTORY_IMAGES_100_SIGN_IN_PROMO_JPG); |
148 source->AddResourcePath("images/200/sign_in_promo.jpg", | 148 source->AddResourcePath("images/200/sign_in_promo.jpg", |
149 IDR_MD_HISTORY_IMAGES_200_SIGN_IN_PROMO_JPG); | 149 IDR_MD_HISTORY_IMAGES_200_SIGN_IN_PROMO_JPG); |
150 source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS); | 150 source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS); |
151 | 151 |
152 #if BUILDFLAG(USE_VULCANIZE) | 152 #if BUILDFLAG(USE_VULCANIZE) |
153 source->ExcludePathFromGzip(""); | |
tsergeant
2016/12/21 02:05:45
Does this work with urls like /syncedTabs, which r
Dan Beam
2016/12/21 23:36:42
it does now!
tsergeant
2016/12/21 23:37:59
The failing test (which loads the URL chrome://his
| |
154 source->ExcludePathFromGzip("constants.html"); | |
155 source->ExcludePathFromGzip("constants.js"); | |
156 source->ExcludePathFromGzip("history.js"); | |
157 source->ExcludePathFromGzip("images/100/sign_in_promo.jpg"); | |
158 source->ExcludePathFromGzip("images/200/sign_in_promo.jpg"); | |
159 source->UseGzipForAllPaths(); | |
160 | |
153 source->AddResourcePath("app.html", | 161 source->AddResourcePath("app.html", |
154 IDR_MD_HISTORY_APP_VULCANIZED_HTML); | 162 IDR_MD_HISTORY_APP_VULCANIZED_HTML); |
155 source->AddResourcePath("app.crisper.js", | 163 source->AddResourcePath("app.crisper.js", |
156 IDR_MD_HISTORY_APP_CRISPER_JS); | 164 IDR_MD_HISTORY_APP_CRISPER_JS); |
157 source->AddResourcePath("lazy_load.html", | 165 source->AddResourcePath("lazy_load.html", |
158 IDR_MD_HISTORY_LAZY_LOAD_VULCANIZED_HTML); | 166 IDR_MD_HISTORY_LAZY_LOAD_VULCANIZED_HTML); |
159 source->AddResourcePath("lazy_load.crisper.js", | 167 source->AddResourcePath("lazy_load.crisper.js", |
160 IDR_MD_HISTORY_LAZY_LOAD_CRISPER_JS); | 168 IDR_MD_HISTORY_LAZY_LOAD_CRISPER_JS); |
161 #else | 169 #else |
162 source->AddResourcePath("app.html", IDR_MD_HISTORY_APP_HTML); | 170 source->AddResourcePath("app.html", IDR_MD_HISTORY_APP_HTML); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
275 | 283 |
276 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryHost, | 284 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryHost, |
277 std::move(update)); | 285 std::move(update)); |
278 } | 286 } |
279 | 287 |
280 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) { | 288 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) { |
281 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( | 289 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( |
282 prefs::kMdHistoryMenuPromoShown, true); | 290 prefs::kMdHistoryMenuPromoShown, true); |
283 UpdateDataSource(); | 291 UpdateDataSource(); |
284 } | 292 } |
OLD | NEW |