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

Side by Side Diff: chrome/browser/ui/webui/history_ui.cc

Issue 2570253002: [MD History] Fix toolbar dates in grouped mode. (Closed)
Patch Set: use date interval format Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/history_ui.h" 5 #include "chrome/browser/ui/webui/history_ui.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 source->AddLocalizedString("searchResultsFor", IDS_HISTORY_SEARCHRESULTSFOR); 97 source->AddLocalizedString("searchResultsFor", IDS_HISTORY_SEARCHRESULTSFOR);
98 source->AddLocalizedString("searchResult", IDS_HISTORY_SEARCH_RESULT); 98 source->AddLocalizedString("searchResult", IDS_HISTORY_SEARCH_RESULT);
99 source->AddLocalizedString("searchResults", IDS_HISTORY_SEARCH_RESULTS); 99 source->AddLocalizedString("searchResults", IDS_HISTORY_SEARCH_RESULTS);
100 source->AddLocalizedString("foundSearchResults", 100 source->AddLocalizedString("foundSearchResults",
101 IDS_HISTORY_FOUND_SEARCH_RESULTS); 101 IDS_HISTORY_FOUND_SEARCH_RESULTS);
102 source->AddLocalizedString("history", IDS_HISTORY_BROWSERESULTS); 102 source->AddLocalizedString("history", IDS_HISTORY_BROWSERESULTS);
103 source->AddLocalizedString("cont", IDS_HISTORY_CONTINUED); 103 source->AddLocalizedString("cont", IDS_HISTORY_CONTINUED);
104 source->AddLocalizedString("searchButton", IDS_HISTORY_SEARCH_BUTTON); 104 source->AddLocalizedString("searchButton", IDS_HISTORY_SEARCH_BUTTON);
105 source->AddLocalizedString("noSearchResults", IDS_HISTORY_NO_SEARCH_RESULTS); 105 source->AddLocalizedString("noSearchResults", IDS_HISTORY_NO_SEARCH_RESULTS);
106 source->AddLocalizedString("noResults", IDS_HISTORY_NO_RESULTS); 106 source->AddLocalizedString("noResults", IDS_HISTORY_NO_RESULTS);
107 source->AddLocalizedString("historyInterval", IDS_HISTORY_INTERVAL);
108 source->AddLocalizedString("removeSelected", 107 source->AddLocalizedString("removeSelected",
109 IDS_HISTORY_REMOVE_SELECTED_ITEMS); 108 IDS_HISTORY_REMOVE_SELECTED_ITEMS);
110 source->AddLocalizedString("clearAllHistory", 109 source->AddLocalizedString("clearAllHistory",
111 IDS_HISTORY_OPEN_CLEAR_BROWSING_DATA_DIALOG); 110 IDS_HISTORY_OPEN_CLEAR_BROWSING_DATA_DIALOG);
112 111
113 auto availability = IncognitoModePrefs::GetAvailability(profile->GetPrefs()); 112 auto availability = IncognitoModePrefs::GetAvailability(profile->GetPrefs());
114 base::string16 delete_string = availability == IncognitoModePrefs::ENABLED 113 base::string16 delete_string = availability == IncognitoModePrefs::ENABLED
115 ? l10n_util::GetStringFUTF16( 114 ? l10n_util::GetStringFUTF16(
116 IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING, 115 IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING,
117 base::UTF8ToUTF16(kIncognitoModeShortcut)) 116 base::UTF8ToUTF16(kIncognitoModeShortcut))
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 217 }
219 218
220 void HistoryUI::UpdateDataSource() { 219 void HistoryUI::UpdateDataSource() {
221 CHECK(web_ui()); 220 CHECK(web_ui());
222 Profile* profile = Profile::FromWebUI(web_ui()); 221 Profile* profile = Profile::FromWebUI(web_ui());
223 std::unique_ptr<base::DictionaryValue> update(new base::DictionaryValue); 222 std::unique_ptr<base::DictionaryValue> update(new base::DictionaryValue);
224 update->SetBoolean(kIsUserSignedInKey, IsSignedIn(profile)); 223 update->SetBoolean(kIsUserSignedInKey, IsSignedIn(profile));
225 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryFrameHost, 224 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryFrameHost,
226 std::move(update)); 225 std::move(update));
227 } 226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698