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

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

Issue 1585473003: MD History: Added a clear browsing data button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@second_patch
Patch Set: ye Created 4 years, 10 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
« no previous file with comments | « chrome/browser/resources/md_history/history_toolbar.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/webui/browsing_history_handler.h" 9 #include "chrome/browser/ui/webui/browsing_history_handler.h"
10 #include "chrome/browser/ui/webui/metrics_handler.h" 10 #include "chrome/browser/ui/webui/metrics_handler.h"
(...skipping 17 matching lines...) Expand all
28 28
29 namespace { 29 namespace {
30 30
31 content::WebUIDataSource* CreateMdHistoryUIHTMLSource(Profile* profile) { 31 content::WebUIDataSource* CreateMdHistoryUIHTMLSource(Profile* profile) {
32 PrefService* prefs = profile->GetPrefs(); 32 PrefService* prefs = profile->GetPrefs();
33 33
34 content::WebUIDataSource* source = 34 content::WebUIDataSource* source =
35 content::WebUIDataSource::Create(chrome::kChromeUIHistoryHost); 35 content::WebUIDataSource::Create(chrome::kChromeUIHistoryHost);
36 36
37 // Localized strings (alphabetical order). 37 // Localized strings (alphabetical order).
38 source->AddLocalizedString("clearBrowsingData",
39 IDS_CLEAR_BROWSING_DATA_TITLE);
38 source->AddLocalizedString("clearSearch", IDS_MD_HISTORY_CLEAR_SEARCH); 40 source->AddLocalizedString("clearSearch", IDS_MD_HISTORY_CLEAR_SEARCH);
39 source->AddLocalizedString("cancel", IDS_CANCEL); 41 source->AddLocalizedString("cancel", IDS_CANCEL);
40 source->AddLocalizedString("delete", IDS_MD_HISTORY_DELETE); 42 source->AddLocalizedString("delete", IDS_MD_HISTORY_DELETE);
41 source->AddLocalizedString("itemsSelected", IDS_MD_HISTORY_ITEMS_SELECTED); 43 source->AddLocalizedString("itemsSelected", IDS_MD_HISTORY_ITEMS_SELECTED);
42 source->AddLocalizedString("moreFromSite", IDS_HISTORY_MORE_FROM_SITE); 44 source->AddLocalizedString("moreFromSite", IDS_HISTORY_MORE_FROM_SITE);
43 source->AddLocalizedString("removeFromHistory", IDS_HISTORY_REMOVE_PAGE); 45 source->AddLocalizedString("removeFromHistory", IDS_HISTORY_REMOVE_PAGE);
44 source->AddLocalizedString("search", IDS_MD_HISTORY_SEARCH); 46 source->AddLocalizedString("search", IDS_MD_HISTORY_SEARCH);
45 source->AddLocalizedString("title", IDS_HISTORY_TITLE); 47 source->AddLocalizedString("title", IDS_HISTORY_TITLE);
46 48
47 bool allow_deleting_history = 49 bool allow_deleting_history =
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 content::WebUIDataSource::Add(profile, CreateMdHistoryUIHTMLSource(profile)); 90 content::WebUIDataSource::Add(profile, CreateMdHistoryUIHTMLSource(profile));
89 } 91 }
90 92
91 MdHistoryUI::~MdHistoryUI() {} 93 MdHistoryUI::~MdHistoryUI() {}
92 94
93 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes( 95 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes(
94 ui::ScaleFactor scale_factor) { 96 ui::ScaleFactor scale_factor) {
95 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( 97 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
96 IDR_HISTORY_FAVICON, scale_factor); 98 IDR_HISTORY_FAVICON, scale_factor);
97 } 99 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/history_toolbar.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698