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

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 5 errors. Created 4 years, 2 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
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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 "enableExperimentalAccessibilityFeatures", 734 "enableExperimentalAccessibilityFeatures",
735 base::CommandLine::ForCurrentProcess()->HasSwitch( 735 base::CommandLine::ForCurrentProcess()->HasSwitch(
736 chromeos::switches::kEnableExperimentalAccessibilityFeatures)); 736 chromeos::switches::kEnableExperimentalAccessibilityFeatures));
737 737
738 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get(); 738 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get();
739 bool allow_bluetooth = true; 739 bool allow_bluetooth = true;
740 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth); 740 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth);
741 values->SetBoolean("allowBluetooth", allow_bluetooth); 741 values->SetBoolean("allowBluetooth", allow_bluetooth);
742 742
743 values->SetBoolean("showQuickUnlockSettings", 743 values->SetBoolean("showQuickUnlockSettings",
744 chromeos::IsQuickUnlockEnabled()); 744 chromeos::IsQuickUnlockEnabled(profile->GetPrefs()));
745 if (chromeos::IsQuickUnlockEnabled()) { 745 if (chromeos::IsQuickUnlockEnabled(profile->GetPrefs())) {
746 values->SetString( 746 values->SetString(
747 "enableScreenlock", 747 "enableScreenlock",
748 l10n_util::GetStringUTF16( 748 l10n_util::GetStringUTF16(
749 IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX_WITH_QUICK_UNLOCK)); 749 IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX_WITH_QUICK_UNLOCK));
750 } else { 750 } else {
751 values->SetString( 751 values->SetString(
752 "enableScreenlock", 752 "enableScreenlock",
753 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX)); 753 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX));
754 } 754 }
755 // Format numbers to be used on the pin keyboard. 755 // Format numbers to be used on the pin keyboard.
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 2233
2234 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2234 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2235 #if defined(OS_CHROMEOS) 2235 #if defined(OS_CHROMEOS)
2236 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2236 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2237 #else 2237 #else
2238 return true; 2238 return true;
2239 #endif 2239 #endif
2240 } 2240 }
2241 2241
2242 } // namespace options 2242 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698