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/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 "deleteWarning", IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING_NO_INCOGNITO); | 73 "deleteWarning", IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING_NO_INCOGNITO); |
74 source->AddLocalizedString("entrySummary", IDS_HISTORY_ENTRY_SUMMARY); | 74 source->AddLocalizedString("entrySummary", IDS_HISTORY_ENTRY_SUMMARY); |
75 source->AddLocalizedString("expandSessionButton", | 75 source->AddLocalizedString("expandSessionButton", |
76 IDS_HISTORY_OTHER_SESSIONS_EXPAND_SESSION); | 76 IDS_HISTORY_OTHER_SESSIONS_EXPAND_SESSION); |
77 source->AddLocalizedString("foundSearchResults", | 77 source->AddLocalizedString("foundSearchResults", |
78 IDS_HISTORY_FOUND_SEARCH_RESULTS); | 78 IDS_HISTORY_FOUND_SEARCH_RESULTS); |
79 source->AddLocalizedString("hasSyncedResults", | 79 source->AddLocalizedString("hasSyncedResults", |
80 IDS_MD_HISTORY_HAS_SYNCED_RESULTS); | 80 IDS_MD_HISTORY_HAS_SYNCED_RESULTS); |
81 source->AddLocalizedString("hasSyncedResultsDescription", | 81 source->AddLocalizedString("hasSyncedResultsDescription", |
82 IDS_MD_HISTORY_HAS_SYNCED_RESULTS_DESCRIPTION); | 82 IDS_MD_HISTORY_HAS_SYNCED_RESULTS_DESCRIPTION); |
83 source->AddLocalizedString("historyInterval", IDS_HISTORY_INTERVAL); | |
84 source->AddLocalizedString("historyMenuButton", | 83 source->AddLocalizedString("historyMenuButton", |
85 IDS_MD_HISTORY_HISTORY_MENU_DESCRIPTION); | 84 IDS_MD_HISTORY_HISTORY_MENU_DESCRIPTION); |
86 source->AddLocalizedString("historyMenuItem", | 85 source->AddLocalizedString("historyMenuItem", |
87 IDS_MD_HISTORY_HISTORY_MENU_ITEM); | 86 IDS_MD_HISTORY_HISTORY_MENU_ITEM); |
88 source->AddLocalizedString("itemsSelected", IDS_MD_HISTORY_ITEMS_SELECTED); | 87 source->AddLocalizedString("itemsSelected", IDS_MD_HISTORY_ITEMS_SELECTED); |
89 source->AddLocalizedString("loading", IDS_HISTORY_LOADING); | 88 source->AddLocalizedString("loading", IDS_HISTORY_LOADING); |
90 source->AddLocalizedString("menuPromo", IDS_MD_HISTORY_MENU_PROMO); | 89 source->AddLocalizedString("menuPromo", IDS_MD_HISTORY_MENU_PROMO); |
91 source->AddLocalizedString("moreActionsButton", | 90 source->AddLocalizedString("moreActionsButton", |
92 IDS_HISTORY_ACTION_MENU_DESCRIPTION); | 91 IDS_HISTORY_ACTION_MENU_DESCRIPTION); |
93 source->AddLocalizedString("moreFromSite", IDS_HISTORY_MORE_FROM_SITE); | 92 source->AddLocalizedString("moreFromSite", IDS_HISTORY_MORE_FROM_SITE); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 | 270 |
272 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryHost, | 271 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryHost, |
273 std::move(update)); | 272 std::move(update)); |
274 } | 273 } |
275 | 274 |
276 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) { | 275 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) { |
277 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( | 276 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( |
278 prefs::kMdHistoryMenuPromoShown, true); | 277 prefs::kMdHistoryMenuPromoShown, true); |
279 UpdateDataSource(); | 278 UpdateDataSource(); |
280 } | 279 } |
OLD | NEW |