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

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

Issue 2570253002: [MD History] Fix toolbar dates in grouped mode. (Closed)
Patch Set: rebase 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 source->AddLocalizedString("searchResultsFor", IDS_HISTORY_SEARCHRESULTSFOR); 98 source->AddLocalizedString("searchResultsFor", IDS_HISTORY_SEARCHRESULTSFOR);
99 source->AddLocalizedString("searchResult", IDS_HISTORY_SEARCH_RESULT); 99 source->AddLocalizedString("searchResult", IDS_HISTORY_SEARCH_RESULT);
100 source->AddLocalizedString("searchResults", IDS_HISTORY_SEARCH_RESULTS); 100 source->AddLocalizedString("searchResults", IDS_HISTORY_SEARCH_RESULTS);
101 source->AddLocalizedString("foundSearchResults", 101 source->AddLocalizedString("foundSearchResults",
102 IDS_HISTORY_FOUND_SEARCH_RESULTS); 102 IDS_HISTORY_FOUND_SEARCH_RESULTS);
103 source->AddLocalizedString("history", IDS_HISTORY_BROWSERESULTS); 103 source->AddLocalizedString("history", IDS_HISTORY_BROWSERESULTS);
104 source->AddLocalizedString("cont", IDS_HISTORY_CONTINUED); 104 source->AddLocalizedString("cont", IDS_HISTORY_CONTINUED);
105 source->AddLocalizedString("searchButton", IDS_HISTORY_SEARCH_BUTTON); 105 source->AddLocalizedString("searchButton", IDS_HISTORY_SEARCH_BUTTON);
106 source->AddLocalizedString("noSearchResults", IDS_HISTORY_NO_SEARCH_RESULTS); 106 source->AddLocalizedString("noSearchResults", IDS_HISTORY_NO_SEARCH_RESULTS);
107 source->AddLocalizedString("noResults", IDS_HISTORY_NO_RESULTS); 107 source->AddLocalizedString("noResults", IDS_HISTORY_NO_RESULTS);
108 source->AddLocalizedString("historyInterval", IDS_HISTORY_INTERVAL);
109 source->AddLocalizedString("removeSelected", 108 source->AddLocalizedString("removeSelected",
110 IDS_HISTORY_REMOVE_SELECTED_ITEMS); 109 IDS_HISTORY_REMOVE_SELECTED_ITEMS);
111 source->AddLocalizedString("clearAllHistory", 110 source->AddLocalizedString("clearAllHistory",
112 IDS_HISTORY_OPEN_CLEAR_BROWSING_DATA_DIALOG); 111 IDS_HISTORY_OPEN_CLEAR_BROWSING_DATA_DIALOG);
113 112
114 auto availability = IncognitoModePrefs::GetAvailability(profile->GetPrefs()); 113 auto availability = IncognitoModePrefs::GetAvailability(profile->GetPrefs());
115 base::string16 delete_string = availability == IncognitoModePrefs::ENABLED 114 base::string16 delete_string = availability == IncognitoModePrefs::ENABLED
116 ? l10n_util::GetStringFUTF16( 115 ? l10n_util::GetStringFUTF16(
117 IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING, 116 IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING,
118 base::UTF8ToUTF16(kIncognitoModeShortcut)) 117 base::UTF8ToUTF16(kIncognitoModeShortcut))
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 219 }
221 220
222 void HistoryUI::UpdateDataSource() { 221 void HistoryUI::UpdateDataSource() {
223 CHECK(web_ui()); 222 CHECK(web_ui());
224 Profile* profile = Profile::FromWebUI(web_ui()); 223 Profile* profile = Profile::FromWebUI(web_ui());
225 std::unique_ptr<base::DictionaryValue> update(new base::DictionaryValue); 224 std::unique_ptr<base::DictionaryValue> update(new base::DictionaryValue);
226 update->SetBoolean(kIsUserSignedInKey, IsSignedIn(profile)); 225 update->SetBoolean(kIsUserSignedInKey, IsSignedIn(profile));
227 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryFrameHost, 226 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryFrameHost,
228 std::move(update)); 227 std::move(update));
229 } 228 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/browsing_history_handler.cc ('k') | chrome/browser/ui/webui/md_history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698