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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 2387253002: cros: Added policies for screen unlock. (Closed)
Patch Set: Fixed patch set 15 errors. 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 "enableExperimentalAccessibilityFeatures", 732 "enableExperimentalAccessibilityFeatures",
733 base::CommandLine::ForCurrentProcess()->HasSwitch( 733 base::CommandLine::ForCurrentProcess()->HasSwitch(
734 chromeos::switches::kEnableExperimentalAccessibilityFeatures)); 734 chromeos::switches::kEnableExperimentalAccessibilityFeatures));
735 735
736 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get(); 736 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get();
737 bool allow_bluetooth = true; 737 bool allow_bluetooth = true;
738 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth); 738 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth);
739 values->SetBoolean("allowBluetooth", allow_bluetooth); 739 values->SetBoolean("allowBluetooth", allow_bluetooth);
740 740
741 values->SetBoolean("showQuickUnlockSettings", 741 values->SetBoolean("showQuickUnlockSettings",
742 chromeos::IsQuickUnlockEnabled()); 742 chromeos::IsPinUnlockEnabled(profile->GetPrefs()));
743 if (chromeos::IsQuickUnlockEnabled()) { 743 if (chromeos::IsPinUnlockEnabled(profile->GetPrefs())) {
744 values->SetString( 744 values->SetString(
745 "enableScreenlock", 745 "enableScreenlock",
746 l10n_util::GetStringUTF16( 746 l10n_util::GetStringUTF16(
747 IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX_WITH_QUICK_UNLOCK)); 747 IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX_WITH_QUICK_UNLOCK));
748 } else { 748 } else {
749 values->SetString( 749 values->SetString(
750 "enableScreenlock", 750 "enableScreenlock",
751 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX)); 751 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX));
752 } 752 }
753 // Format numbers to be used on the pin keyboard. 753 // Format numbers to be used on the pin keyboard.
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2231 2231
2232 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2232 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2233 #if defined(OS_CHROMEOS) 2233 #if defined(OS_CHROMEOS)
2234 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2234 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2235 #else 2235 #else
2236 return true; 2236 return true;
2237 #endif 2237 #endif
2238 } 2238 }
2239 2239
2240 } // namespace options 2240 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698