| 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/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 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 content::WebUIDataSource* html_source = | 111 content::WebUIDataSource* html_source = |
| 112 content::WebUIDataSource::Create(url.host()); | 112 content::WebUIDataSource::Create(url.host()); |
| 113 | 113 |
| 114 #if defined(OS_CHROMEOS) | 114 #if defined(OS_CHROMEOS) |
| 115 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = | 115 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = |
| 116 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, | 116 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, |
| 117 profile); | 117 profile); |
| 118 if (easy_unlock_handler) | 118 if (easy_unlock_handler) |
| 119 AddSettingsPageUIHandler(easy_unlock_handler); | 119 AddSettingsPageUIHandler(easy_unlock_handler); |
| 120 | 120 |
| 121 html_source->AddBoolean("noteAllowed", ash::IsPaletteEnabled()); | 121 html_source->AddBoolean("stylusAllowed", ash::IsPaletteEnabled()); |
| 122 html_source->AddBoolean("quickUnlockEnabled", | 122 html_source->AddBoolean("quickUnlockEnabled", |
| 123 chromeos::IsQuickUnlockEnabled()); | 123 chromeos::IsQuickUnlockEnabled()); |
| 124 #endif | 124 #endif |
| 125 | 125 |
| 126 AddSettingsPageUIHandler(AboutHandler::Create(html_source, profile)); | 126 AddSettingsPageUIHandler(AboutHandler::Create(html_source, profile)); |
| 127 AddSettingsPageUIHandler(ResetSettingsHandler::Create(html_source, profile)); | 127 AddSettingsPageUIHandler(ResetSettingsHandler::Create(html_source, profile)); |
| 128 | 128 |
| 129 // Add all settings resources. | 129 // Add all settings resources. |
| 130 for (size_t i = 0; i < kSettingsResourcesSize; ++i) { | 130 for (size_t i = 0; i < kSettingsResourcesSize; ++i) { |
| 131 html_source->AddResourcePath(kSettingsResources[i].name, | 131 html_source->AddResourcePath(kSettingsResources[i].name, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 161 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", | 161 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", |
| 162 base::Time::Now() - load_start_time_); | 162 base::Time::Now() - load_start_time_); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { | 165 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { |
| 166 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", | 166 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", |
| 167 base::Time::Now() - load_start_time_); | 167 base::Time::Now() - load_start_time_); |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace settings | 170 } // namespace settings |
| OLD | NEW |