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

Unified Diff: chrome/browser/ui/webui/history_ui.cc

Issue 2195263002: MD History: UI polish pass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/history_ui.h ('k') | chrome/browser/ui/webui/md_history_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/history_ui.cc
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index c80543e8a075c6f04fe28b7ecc4b34f2e1b1c159..aee3c2c6511df8e3d31c0ff2ae3391e0f0849f87 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -101,8 +101,14 @@ content::WebUIDataSource* CreateHistoryUIHTMLSource(Profile* profile) {
source->AddLocalizedString("clearAllHistory",
IDS_HISTORY_OPEN_CLEAR_BROWSING_DATA_DIALOG);
- source->AddString("deleteWarning",
- HistoryUI::GetDeleteWarningString(profile));
+ auto availability = IncognitoModePrefs::GetAvailability(profile->GetPrefs());
+ base::string16 delete_string = availability == IncognitoModePrefs::ENABLED
+ ? l10n_util::GetStringFUTF16(
+ IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING,
+ base::UTF8ToUTF16(kIncognitoModeShortcut))
+ : l10n_util::GetStringUTF16(
+ IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING_NO_INCOGNITO);
+ source->AddString("deleteWarning", delete_string);
source->AddLocalizedString("removeBookmark", IDS_HISTORY_REMOVE_BOOKMARK);
source->AddLocalizedString("actionMenuDescription",
@@ -199,14 +205,3 @@ base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes(
return ResourceBundle::GetSharedInstance().
LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor);
}
-
-// static
-base::string16 HistoryUI::GetDeleteWarningString(Profile* profile) {
- auto availability = IncognitoModePrefs::GetAvailability(profile->GetPrefs());
- return availability == IncognitoModePrefs::ENABLED
- ? l10n_util::GetStringFUTF16(
- IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING,
- base::UTF8ToUTF16(kIncognitoModeShortcut))
- : l10n_util::GetStringUTF16(
- IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING_NO_INCOGNITO);
-}
« no previous file with comments | « chrome/browser/ui/webui/history_ui.h ('k') | chrome/browser/ui/webui/md_history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698