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

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

Issue 2906103002: Post-cleanup settings reset. (Closed)
Patch Set: Use base::DoNothing Created 3 years, 6 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/chrome_cleanup_handler.cc ('k') | chrome/common/pref_names.h » ('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
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698