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

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

Issue 2691943005: fix quick unlock config in options (Closed)
Patch Set: incorporate comments Created 3 years, 9 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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 807
808 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get(); 808 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get();
809 bool allow_bluetooth = true; 809 bool allow_bluetooth = true;
810 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth); 810 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth);
811 values->SetBoolean("allowBluetooth", allow_bluetooth); 811 values->SetBoolean("allowBluetooth", allow_bluetooth);
812 812
813 values->SetBoolean("showQuickUnlockSettings", 813 values->SetBoolean("showQuickUnlockSettings",
814 chromeos::quick_unlock::IsPinEnabled(profile->GetPrefs())); 814 chromeos::quick_unlock::IsPinEnabled(profile->GetPrefs()));
815 values->SetBoolean("fingerprintUnlockEnabled", 815 values->SetBoolean("fingerprintUnlockEnabled",
816 chromeos::quick_unlock::IsFingerprintEnabled()); 816 chromeos::quick_unlock::IsFingerprintEnabled());
817 values->SetBoolean("pinUnlockEnabled",
818 chromeos::quick_unlock::IsPinEnabled(profile->GetPrefs()));
817 if (chromeos::quick_unlock::IsPinEnabled(profile->GetPrefs())) { 819 if (chromeos::quick_unlock::IsPinEnabled(profile->GetPrefs())) {
818 values->SetString( 820 values->SetString(
819 "enableScreenlock", 821 "enableScreenlock",
820 l10n_util::GetStringUTF16( 822 l10n_util::GetStringUTF16(
821 IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX_WITH_QUICK_UNLOCK)); 823 IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX_WITH_QUICK_UNLOCK));
822 } else { 824 } else {
823 values->SetString( 825 values->SetString(
824 "enableScreenlock", 826 "enableScreenlock",
825 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX)); 827 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX));
826 } 828 }
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 2363
2362 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2364 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2363 #if defined(OS_CHROMEOS) 2365 #if defined(OS_CHROMEOS)
2364 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2366 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2365 #else 2367 #else
2366 return true; 2368 return true;
2367 #endif 2369 #endif
2368 } 2370 }
2369 2371
2370 } // namespace options 2372 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/people_page/lock_screen.js ('k') | chrome/browser/ui/webui/options/options_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698