| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 // either chrome://settings or chrome://md-settings. | 175 // either chrome://settings or chrome://md-settings. |
| 176 CHECK(IsValidOrigin(url)); | 176 CHECK(IsValidOrigin(url)); |
| 177 | 177 |
| 178 content::WebUIDataSource* html_source = | 178 content::WebUIDataSource* html_source = |
| 179 content::WebUIDataSource::Create(url.host()); | 179 content::WebUIDataSource::Create(url.host()); |
| 180 html_source->AddString("hostname", url.host()); | 180 html_source->AddString("hostname", url.host()); |
| 181 | 181 |
| 182 #if defined(OS_WIN) | 182 #if defined(OS_WIN) |
| 183 if (base::FeatureList::IsEnabled(safe_browsing::kInBrowserCleanerUIFeature) && | 183 if (base::FeatureList::IsEnabled(safe_browsing::kInBrowserCleanerUIFeature) && |
| 184 safe_browsing::ChromeCleanerController::ShouldShowCleanupInSettingsUI()) { | 184 safe_browsing::ChromeCleanerController::ShouldShowCleanupInSettingsUI()) { |
| 185 AddSettingsPageUIHandler(base::MakeUnique<ChromeCleanupHandler>()); | 185 AddSettingsPageUIHandler(base::MakeUnique<ChromeCleanupHandler>(profile)); |
| 186 html_source->AddBoolean("chromeCleanupEnabled", true); | 186 html_source->AddBoolean("chromeCleanupEnabled", true); |
| 187 } | 187 } |
| 188 #endif // defined(OS_WIN) | 188 #endif // defined(OS_WIN) |
| 189 | 189 |
| 190 #if defined(OS_CHROMEOS) | 190 #if defined(OS_CHROMEOS) |
| 191 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = | 191 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = |
| 192 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, | 192 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, |
| 193 profile); | 193 profile); |
| 194 if (easy_unlock_handler) | 194 if (easy_unlock_handler) |
| 195 AddSettingsPageUIHandler(base::WrapUnique(easy_unlock_handler)); | 195 AddSettingsPageUIHandler(base::WrapUnique(easy_unlock_handler)); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", | 276 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", |
| 277 base::Time::Now() - load_start_time_); | 277 base::Time::Now() - load_start_time_); |
| 278 } | 278 } |
| 279 | 279 |
| 280 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { | 280 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { |
| 281 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", | 281 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", |
| 282 base::Time::Now() - load_start_time_); | 282 base::Time::Now() - load_start_time_); |
| 283 } | 283 } |
| 284 | 284 |
| 285 } // namespace settings | 285 } // namespace settings |
| OLD | NEW |