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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 bool group_by_domain = base::CommandLine::ForCurrentProcess()->HasSwitch( | 136 bool group_by_domain = base::CommandLine::ForCurrentProcess()->HasSwitch( |
137 switches::kHistoryEnableGroupByDomain) || profile->IsSupervised(); | 137 switches::kHistoryEnableGroupByDomain) || profile->IsSupervised(); |
138 source->AddBoolean("groupByDomain", group_by_domain); | 138 source->AddBoolean("groupByDomain", group_by_domain); |
139 | 139 |
140 source->AddBoolean("isGuestSession", profile->IsGuestSession()); | 140 source->AddBoolean("isGuestSession", profile->IsGuestSession()); |
141 | 141 |
142 source->AddBoolean(kIsUserSignedInKey, IsUserSignedIn(profile)); | 142 source->AddBoolean(kIsUserSignedInKey, IsUserSignedIn(profile)); |
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.png", | 146 source->AddResourcePath("images/100/sign_in_promo.jpg", |
147 IDR_MD_HISTORY_IMAGES_100_SIGN_IN_PROMO_PNG); | 147 IDR_MD_HISTORY_IMAGES_100_SIGN_IN_PROMO_JPG); |
148 source->AddResourcePath("images/200/sign_in_promo.png", | 148 source->AddResourcePath("images/200/sign_in_promo.jpg", |
149 IDR_MD_HISTORY_IMAGES_200_SIGN_IN_PROMO_PNG); | 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->AddResourcePath("app.html", | 153 source->AddResourcePath("app.html", |
154 IDR_MD_HISTORY_APP_VULCANIZED_HTML); | 154 IDR_MD_HISTORY_APP_VULCANIZED_HTML); |
155 source->AddResourcePath("app.crisper.js", | 155 source->AddResourcePath("app.crisper.js", |
156 IDR_MD_HISTORY_APP_CRISPER_JS); | 156 IDR_MD_HISTORY_APP_CRISPER_JS); |
157 source->AddResourcePath("lazy_load.html", | 157 source->AddResourcePath("lazy_load.html", |
158 IDR_MD_HISTORY_LAZY_LOAD_VULCANIZED_HTML); | 158 IDR_MD_HISTORY_LAZY_LOAD_VULCANIZED_HTML); |
159 source->AddResourcePath("lazy_load.crisper.js", | 159 source->AddResourcePath("lazy_load.crisper.js", |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryHost, | 276 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryHost, |
277 std::move(update)); | 277 std::move(update)); |
278 } | 278 } |
279 | 279 |
280 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) { | 280 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) { |
281 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( | 281 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( |
282 prefs::kMdHistoryMenuPromoShown, true); | 282 prefs::kMdHistoryMenuPromoShown, true); |
283 UpdateDataSource(); | 283 UpdateDataSource(); |
284 } | 284 } |
OLD | NEW |