| 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);
|
| -}
|
|
|