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

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_ui.cc

Issue 1971483002: MD Settings: About page, porting C++ handler and adding browser proxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding include Created 4 years, 7 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/ui/webui/settings/about_handler.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | 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/settings/md_settings_ui.h" 5 #include "chrome/browser/ui/webui/settings/md_settings_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/metrics/histogram_macros.h" 11 #include "base/metrics/histogram_macros.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/webui/settings/about_handler.h"
13 #include "chrome/browser/ui/webui/settings/appearance_handler.h" 14 #include "chrome/browser/ui/webui/settings/appearance_handler.h"
14 #include "chrome/browser/ui/webui/settings/downloads_handler.h" 15 #include "chrome/browser/ui/webui/settings/downloads_handler.h"
15 #include "chrome/browser/ui/webui/settings/font_handler.h" 16 #include "chrome/browser/ui/webui/settings/font_handler.h"
16 #include "chrome/browser/ui/webui/settings/languages_handler.h" 17 #include "chrome/browser/ui/webui/settings/languages_handler.h"
17 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide r.h" 18 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide r.h"
18 #include "chrome/browser/ui/webui/settings/people_handler.h" 19 #include "chrome/browser/ui/webui/settings/people_handler.h"
19 #include "chrome/browser/ui/webui/settings/profile_info_handler.h" 20 #include "chrome/browser/ui/webui/settings/profile_info_handler.h"
20 #include "chrome/browser/ui/webui/settings/reset_settings_handler.h" 21 #include "chrome/browser/ui/webui/settings/reset_settings_handler.h"
21 #include "chrome/browser/ui/webui/settings/search_engines_handler.h" 22 #include "chrome/browser/ui/webui/settings/search_engines_handler.h"
22 #include "chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler. h" 23 #include "chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler. h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 content::WebUIDataSource::Create(chrome::kChromeUIMdSettingsHost); 84 content::WebUIDataSource::Create(chrome::kChromeUIMdSettingsHost);
84 85
85 #if defined(OS_CHROMEOS) 86 #if defined(OS_CHROMEOS)
86 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = 87 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler =
87 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, 88 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source,
88 profile); 89 profile);
89 if (easy_unlock_handler) 90 if (easy_unlock_handler)
90 AddSettingsPageUIHandler(easy_unlock_handler); 91 AddSettingsPageUIHandler(easy_unlock_handler);
91 #endif 92 #endif
92 93
94 AddSettingsPageUIHandler(AboutHandler::Create(html_source, profile));
93 AddSettingsPageUIHandler(ResetSettingsHandler::Create(html_source, profile)); 95 AddSettingsPageUIHandler(ResetSettingsHandler::Create(html_source, profile));
94 96
95 // Add all settings resources. 97 // Add all settings resources.
96 for (size_t i = 0; i < kSettingsResourcesSize; ++i) { 98 for (size_t i = 0; i < kSettingsResourcesSize; ++i) {
97 html_source->AddResourcePath(kSettingsResources[i].name, 99 html_source->AddResourcePath(kSettingsResources[i].name,
98 kSettingsResources[i].value); 100 kSettingsResources[i].value);
99 } 101 }
100 102
101 AddLocalizedStrings(html_source, profile); 103 AddLocalizedStrings(html_source, profile);
102 html_source->SetDefaultResource(IDR_SETTINGS_SETTINGS_HTML); 104 html_source->SetDefaultResource(IDR_SETTINGS_SETTINGS_HTML);
(...skipping 24 matching lines...) Expand all
127 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", 129 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD",
128 base::Time::Now() - load_start_time_); 130 base::Time::Now() - load_start_time_);
129 } 131 }
130 132
131 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { 133 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() {
132 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", 134 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD",
133 base::Time::Now() - load_start_time_); 135 base::Time::Now() - load_start_time_);
134 } 136 }
135 137
136 } // namespace settings 138 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/about_handler.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698