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

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

Issue 2538303002: md-settings: Added settings for fingerprint unlock. (Closed)
Patch Set: Fixed patch set 7 errors. Created 4 years 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 { "confirm", IDS_CONFIRM }, 508 { "confirm", IDS_CONFIRM },
509 { "configurePinChoosePinTitle", 509 { "configurePinChoosePinTitle",
510 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CHOOSE_PIN_TITLE }, 510 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CHOOSE_PIN_TITLE },
511 { "configurePinConfirmPinTitle", 511 { "configurePinConfirmPinTitle",
512 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CONFIRM_PIN_TITLE }, 512 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CONFIRM_PIN_TITLE },
513 { "configurePinContinueButton", 513 { "configurePinContinueButton",
514 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CONTINUE_BUTTON }, 514 IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_CONTINUE_BUTTON },
515 { "configurePinMismatched", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_MISMATCHED }, 515 { "configurePinMismatched", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_MISMATCHED },
516 { "configurePinTooShort", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_TOO_SHORT} , 516 { "configurePinTooShort", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_TOO_SHORT} ,
517 { "configurePinWeakPin", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_WEAK_PIN }, 517 { "configurePinWeakPin", IDS_SETTINGS_PEOPLE_CONFIGURE_PIN_WEAK_PIN },
518 { "lockScreenAddFingerprint",
519 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_ADD_FINGERPRINT_BUTTON},
520 { "lockScreenCannotAddFingerprint",
521 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_CANNOT_ADD_NEW_FINGERPRINT},
518 { "lockScreenChangePinButton", 522 { "lockScreenChangePinButton",
519 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_CHANGE_PIN_BUTTON}, 523 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_CHANGE_PIN_BUTTON},
524 { "lockScreenFingerprintEnable",
525 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_ENABLE_FINGERPRINT_CHECKBOX_LABEL},
526 { "lockScreenFingerprintNewName",
527 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_NEW_FINGERPRINT_DEFAULT_NAME},
528 { "lockScreenFingerprintWarning",
529 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_FINGERPRINT_LESS_SECURE},
520 { "lockScreenNone", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_NONE }, 530 { "lockScreenNone", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_NONE },
521 { "lockScreenPasswordOnly", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_PASSWORD_ONLY }, 531 { "lockScreenPasswordOnly", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_PASSWORD_ONLY },
522 { "lockScreenPinOrPassword", 532 { "lockScreenPinOrPassword",
523 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_PIN_OR_PASSWORD }, 533 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_PIN_OR_PASSWORD },
534 { "lockScreenRegisteredFingerprints",
535 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_REGISTERED_FINGERPRINTS_LABEL},
524 { "lockScreenSetupPinButton", 536 { "lockScreenSetupPinButton",
525 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_SETUP_PIN_BUTTON }, 537 IDS_SETTINGS_PEOPLE_LOCK_SCREEN_SETUP_PIN_BUTTON },
526 { "lockScreenTitle", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_TITLE }, 538 { "lockScreenTitle", IDS_SETTINGS_PEOPLE_LOCK_SCREEN_TITLE },
527 { "passwordPromptEnterPassword", 539 { "passwordPromptEnterPassword",
528 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_ENTER_PASSWORD }, 540 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_ENTER_PASSWORD },
529 { "passwordPromptInvalidPassword", 541 { "passwordPromptInvalidPassword",
530 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_INVALID_PASSWORD }, 542 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_INVALID_PASSWORD },
531 { "passwordPromptPasswordLabel", 543 { "passwordPromptPasswordLabel",
532 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_PASSWORD_LABEL }, 544 IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_PASSWORD_LABEL },
533 { "passwordPromptTitle", IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_TITLE }, 545 { "passwordPromptTitle", IDS_SETTINGS_PEOPLE_PASSWORD_PROMPT_TITLE },
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 base::CommandLine::ForCurrentProcess()->HasSwitch( 772 base::CommandLine::ForCurrentProcess()->HasSwitch(
761 chromeos::switches::kEnableExperimentalAccessibilityFeatures)); 773 chromeos::switches::kEnableExperimentalAccessibilityFeatures));
762 774
763 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get(); 775 chromeos::CrosSettings* cros_settings = chromeos::CrosSettings::Get();
764 bool allow_bluetooth = true; 776 bool allow_bluetooth = true;
765 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth); 777 cros_settings->GetBoolean(chromeos::kAllowBluetooth, &allow_bluetooth);
766 values->SetBoolean("allowBluetooth", allow_bluetooth); 778 values->SetBoolean("allowBluetooth", allow_bluetooth);
767 779
768 values->SetBoolean("showQuickUnlockSettings", 780 values->SetBoolean("showQuickUnlockSettings",
769 chromeos::IsPinUnlockEnabled(profile->GetPrefs())); 781 chromeos::IsPinUnlockEnabled(profile->GetPrefs()));
782 values->SetBoolean("fingerprintUnlockEnabled",
783 chromeos::IsFingerprintUnlockEnabled());
stevenjb 2016/12/07 23:25:40 Is this implemented in the options UI? I only see
sammiequon 2016/12/08 03:50:50 It's meant to be md-settings only, but it has to b
stevenjb 2016/12/08 16:49:41 Is this used in this CL? If so I missed it. If not
sammiequon 2016/12/08 20:22:40 Yes, lock_screen.html was added previously so this
stevenjb 2016/12/08 20:50:21 Could you go ahead and separate those changes from
sammiequon 2016/12/08 21:44:01 Hmmm, maybe I didn't explain properly in the previ
jdufault 2016/12/09 17:54:01 We should make sure this works in both options and
770 if (chromeos::IsPinUnlockEnabled(profile->GetPrefs())) { 784 if (chromeos::IsPinUnlockEnabled(profile->GetPrefs())) {
771 values->SetString( 785 values->SetString(
772 "enableScreenlock", 786 "enableScreenlock",
773 l10n_util::GetStringUTF16( 787 l10n_util::GetStringUTF16(
774 IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX_WITH_QUICK_UNLOCK)); 788 IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX_WITH_QUICK_UNLOCK));
775 } else { 789 } else {
776 values->SetString( 790 values->SetString(
777 "enableScreenlock", 791 "enableScreenlock",
778 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX)); 792 l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX));
779 } 793 }
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
2298 2312
2299 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2313 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2300 #if defined(OS_CHROMEOS) 2314 #if defined(OS_CHROMEOS)
2301 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2315 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2302 #else 2316 #else
2303 return true; 2317 return true;
2304 #endif 2318 #endif
2305 } 2319 }
2306 2320
2307 } // namespace options 2321 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698