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

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

Issue 2387253002: cros: Added policies for screen unlock. (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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/options/browser_options_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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler = 120 chromeos::settings::EasyUnlockSettingsHandler* easy_unlock_handler =
121 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source, 121 chromeos::settings::EasyUnlockSettingsHandler::Create(html_source,
122 profile); 122 profile);
123 if (easy_unlock_handler) 123 if (easy_unlock_handler)
124 AddSettingsPageUIHandler(easy_unlock_handler); 124 AddSettingsPageUIHandler(easy_unlock_handler);
125 125
126 AddSettingsPageUIHandler( 126 AddSettingsPageUIHandler(
127 chromeos::settings::DateTimeHandler::Create(html_source)); 127 chromeos::settings::DateTimeHandler::Create(html_source));
128 128
129 html_source->AddBoolean("stylusAllowed", ash::IsPaletteFeatureEnabled()); 129 html_source->AddBoolean("stylusAllowed", ash::IsPaletteFeatureEnabled());
130 html_source->AddBoolean("quickUnlockEnabled", 130 html_source->AddBoolean("pinUnlockEnabled",
131 chromeos::IsQuickUnlockEnabled()); 131 chromeos::IsPinUnlockEnabled(profile->GetPrefs()));
132 #endif 132 #endif
133 133
134 AddSettingsPageUIHandler(AboutHandler::Create(html_source, profile)); 134 AddSettingsPageUIHandler(AboutHandler::Create(html_source, profile));
135 AddSettingsPageUIHandler(ResetSettingsHandler::Create(html_source, profile)); 135 AddSettingsPageUIHandler(ResetSettingsHandler::Create(html_source, profile));
136 136
137 // Add all settings resources. 137 // Add all settings resources.
138 for (size_t i = 0; i < kSettingsResourcesSize; ++i) { 138 for (size_t i = 0; i < kSettingsResourcesSize; ++i) {
139 html_source->AddResourcePath(kSettingsResources[i].name, 139 html_source->AddResourcePath(kSettingsResources[i].name,
140 kSettingsResources[i].value); 140 kSettingsResources[i].value);
141 } 141 }
(...skipping 27 matching lines...) Expand all
169 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD", 169 UMA_HISTOGRAM_TIMES("Settings.LoadDocumentTime.MD",
170 base::Time::Now() - load_start_time_); 170 base::Time::Now() - load_start_time_);
171 } 171 }
172 172
173 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() { 173 void MdSettingsUI::DocumentOnLoadCompletedInMainFrame() {
174 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD", 174 UMA_HISTOGRAM_TIMES("Settings.LoadCompletedTime.MD",
175 base::Time::Now() - load_start_time_); 175 base::Time::Now() - load_start_time_);
176 } 176 }
177 177
178 } // namespace settings 178 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698