OLD | NEW |
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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/signin/signin_manager_factory.h" | 10 #include "chrome/browser/signin/signin_manager_factory.h" |
11 #include "chrome/browser/ui/webui/browsing_history_handler.h" | 11 #include "chrome/browser/ui/webui/browsing_history_handler.h" |
12 #include "chrome/browser/ui/webui/foreign_session_handler.h" | 12 #include "chrome/browser/ui/webui/foreign_session_handler.h" |
13 #include "chrome/browser/ui/webui/history_login_handler.h" | 13 #include "chrome/browser/ui/webui/history_login_handler.h" |
14 #include "chrome/browser/ui/webui/metrics_handler.h" | 14 #include "chrome/browser/ui/webui/metrics_handler.h" |
15 #include "chrome/common/chrome_features.h" | 15 #include "chrome/common/chrome_features.h" |
16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
| 19 #include "chrome/grit/browser_resources.h" |
| 20 #include "chrome/grit/generated_resources.h" |
19 #include "chrome/grit/locale_settings.h" | 21 #include "chrome/grit/locale_settings.h" |
| 22 #include "chrome/grit/theme_resources.h" |
| 23 #include "components/grit/components_scaled_resources.h" |
20 #include "components/prefs/pref_service.h" | 24 #include "components/prefs/pref_service.h" |
21 #include "components/search/search.h" | 25 #include "components/search/search.h" |
22 #include "components/signin/core/browser/signin_manager.h" | 26 #include "components/signin/core/browser/signin_manager.h" |
| 27 #include "components/strings/grit/components_strings.h" |
23 #include "content/public/browser/web_ui.h" | 28 #include "content/public/browser/web_ui.h" |
24 #include "content/public/browser/web_ui_data_source.h" | 29 #include "content/public/browser/web_ui_data_source.h" |
25 #include "grit/browser_resources.h" | |
26 #include "grit/components_scaled_resources.h" | |
27 #include "grit/components_strings.h" | |
28 #include "grit/generated_resources.h" | |
29 #include "grit/theme_resources.h" | |
30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
31 #include "ui/base/resource/resource_bundle.h" | 31 #include "ui/base/resource/resource_bundle.h" |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 content::WebUIDataSource* CreateMdHistoryUIHTMLSource(Profile* profile) { | 35 content::WebUIDataSource* CreateMdHistoryUIHTMLSource(Profile* profile) { |
36 PrefService* prefs = profile->GetPrefs(); | 36 PrefService* prefs = profile->GetPrefs(); |
37 | 37 |
38 content::WebUIDataSource* source = | 38 content::WebUIDataSource* source = |
39 content::WebUIDataSource::Create(chrome::kChromeUIHistoryHost); | 39 content::WebUIDataSource::Create(chrome::kChromeUIHistoryHost); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 base::FeatureList::ClearInstanceForTesting(); | 220 base::FeatureList::ClearInstanceForTesting(); |
221 base::FeatureList::SetInstance(std::move(feature_list)); | 221 base::FeatureList::SetInstance(std::move(feature_list)); |
222 } | 222 } |
223 | 223 |
224 // static | 224 // static |
225 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes( | 225 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes( |
226 ui::ScaleFactor scale_factor) { | 226 ui::ScaleFactor scale_factor) { |
227 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( | 227 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( |
228 IDR_HISTORY_FAVICON, scale_factor); | 228 IDR_HISTORY_FAVICON, scale_factor); |
229 } | 229 } |
OLD | NEW |