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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 "enableExperimentalAccessibilityFeatures", 746 "enableExperimentalAccessibilityFeatures",
747 base::CommandLine::ForCurrentProcess()->HasSwitch( 747 base::CommandLine::ForCurrentProcess()->HasSwitch(
748 chromeos::switches::kEnableExperimentalAccessibilityFeatures)); 748 chromeos::switches::kEnableExperimentalAccessibilityFeatures));
749 749
750 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get(); 750 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get();
751 bool allow_bluetooth = true; 751 bool allow_bluetooth = true;
752 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth); 752 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth);
753 values->SetBoolean("allowBluetooth", allow_bluetooth); 753 values->SetBoolean("allowBluetooth", allow_bluetooth);
754 754
755 values->SetBoolean("showQuickUnlockSettings", 755 values->SetBoolean("showQuickUnlockSettings",
756 chromeos::IsQuickUnlockEnabled()); 756 chromeos::IsPinUnlockEnabled(profile->GetPrefs()));
757 if (chromeos::IsQuickUnlockEnabled()) { 757 if (chromeos::IsPinUnlockEnabled(profile->GetPrefs())) {
758 values->SetString( 758 values->SetString(
759 "enableScreenlock", 759 "enableScreenlock",
760 l10n_util::GetStringUTF16( 760 l10n_util::GetStringUTF16(
761 IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX_WITH_QUICK_UNLOCK)); 761 IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX_WITH_QUICK_UNLOCK));
762 } else { 762 } else {
763 values->SetString( 763 values->SetString(
764 "enableScreenlock", 764 "enableScreenlock",
765 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX)); 765 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX));
766 } 766 }
767 // Format numbers to be used on the pin keyboard. 767 // Format numbers to be used on the pin keyboard.
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after
2264 2264
2265 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2265 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2266 #if defined(OS_CHROMEOS) 2266 #if defined(OS_CHROMEOS)
2267 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2267 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2268 #else 2268 #else
2269 return true; 2269 return true;
2270 #endif 2270 #endif
2271 } 2271 }
2272 2272
2273 } // namespace options 2273 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/people_page/people_page.js ('k') | chrome/browser/ui/webui/settings/md_settings_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698