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

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: rebase 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
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 13 matching lines...) Expand all
24 #include "chrome/browser/ui/webui/history_login_handler.h" 24 #include "chrome/browser/ui/webui/history_login_handler.h"
25 #endif 25 #endif
26 26
27 namespace { 27 namespace {
28 28
29 content::WebUIDataSource* CreateMdHistoryUIHTMLSource() { 29 content::WebUIDataSource* CreateMdHistoryUIHTMLSource() {
30 content::WebUIDataSource* source = 30 content::WebUIDataSource* source =
31 content::WebUIDataSource::Create(chrome::kChromeUIHistoryHost); 31 content::WebUIDataSource::Create(chrome::kChromeUIHistoryHost);
32 32
33 // Localized strings (alphabetical order). 33 // Localized strings (alphabetical order).
34 source->AddLocalizedString("clearBrowsingData",
35 IDS_CLEAR_BROWSING_DATA_TITLE);
34 source->AddLocalizedString("clearSearch", IDS_MD_HISTORY_CLEAR_SEARCH); 36 source->AddLocalizedString("clearSearch", IDS_MD_HISTORY_CLEAR_SEARCH);
35 source->AddLocalizedString("moreFromSite", IDS_HISTORY_MORE_FROM_SITE); 37 source->AddLocalizedString("moreFromSite", IDS_HISTORY_MORE_FROM_SITE);
36 source->AddLocalizedString("removeFromHistory", IDS_HISTORY_REMOVE_PAGE); 38 source->AddLocalizedString("removeFromHistory", IDS_HISTORY_REMOVE_PAGE);
37 source->AddLocalizedString("search", IDS_MD_HISTORY_SEARCH); 39 source->AddLocalizedString("search", IDS_MD_HISTORY_SEARCH);
38 source->AddLocalizedString("title", IDS_HISTORY_TITLE); 40 source->AddLocalizedString("title", IDS_HISTORY_TITLE);
39 41
40 source->AddResourcePath("history_card.html", 42 source->AddResourcePath("history_card.html",
41 IDR_MD_HISTORY_HISTORY_CARD_HTML); 43 IDR_MD_HISTORY_HISTORY_CARD_HTML);
42 source->AddResourcePath("history_card.js", IDR_MD_HISTORY_HISTORY_CARD_JS); 44 source->AddResourcePath("history_card.js", IDR_MD_HISTORY_HISTORY_CARD_JS);
43 source->AddResourcePath("history_card_manager.html", 45 source->AddResourcePath("history_card_manager.html",
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 content::WebUIDataSource::Add(profile, CreateMdHistoryUIHTMLSource()); 79 content::WebUIDataSource::Add(profile, CreateMdHistoryUIHTMLSource());
78 } 80 }
79 81
80 MdHistoryUI::~MdHistoryUI() {} 82 MdHistoryUI::~MdHistoryUI() {}
81 83
82 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes( 84 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes(
83 ui::ScaleFactor scale_factor) { 85 ui::ScaleFactor scale_factor) {
84 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( 86 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
85 IDR_HISTORY_FAVICON, scale_factor); 87 IDR_HISTORY_FAVICON, scale_factor);
86 } 88 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698