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

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

Powered by Google App Engine
This is Rietveld 408576698