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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 475483003: Wire easy unlock settings UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/browser_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index d33ad338dc50f8b12a15ce80e1b78051adbe74e1..1863c7df00b182bb2e44fefbf9534ebb11f89ef1 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -250,20 +250,6 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
{ "easyUnlockSectionTitle", IDS_OPTIONS_EASY_UNLOCK_SECTION_TITLE },
{ "easyUnlockSetupButton", IDS_OPTIONS_EASY_UNLOCK_SETUP_BUTTON },
{ "easyUnlockSetupIntro", IDS_OPTIONS_EASY_UNLOCK_SETUP_INTRO },
- { "easyUnlockTurnOffButton", IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_BUTTON },
- { "easyUnlockTurnOffTitle", IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_TITLE },
- { "easyUnlockTurnOffDescription",
- IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_DESCRIPTION },
- { "easyUnlockTurnOffOfflineTitle",
- IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_OFFLINE_TITLE },
- { "easyUnlockTurnOffOfflineMessage",
- IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_OFFLINE_MESSAGE },
- { "easyUnlockTurnOffErrorTitle",
- IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_ERROR_TITLE },
- { "easyUnlockTurnOffErrorMessage",
- IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_ERROR_MESSAGE },
- { "easyUnlockTurnOffRetryButton",
- IDS_OPTIONS_EASY_UNLOCK_TURN_OFF_RETRY_BUTTON },
{ "extensionControlled", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED },
{ "extensionDisable", IDS_OPTIONS_TAB_EXTENSION_CONTROLLED_DISABLE },
{ "fontSettingsCustomizeFontsButton",
@@ -1838,8 +1824,9 @@ void BrowserOptionsHandler::SetupManagingSupervisedUsers() {
void BrowserOptionsHandler::SetupEasyUnlock() {
// TODO(xiyuan): Update when pairing data is really availble.
- bool has_pairing = !Profile::FromWebUI(web_ui())->GetPrefs()
- ->GetDictionary(prefs::kEasyUnlockPairing)->empty();
+ const base::ListValue* devices =
+ EasyUnlockService::Get(Profile::FromWebUI(web_ui()))->GetRemoteDevices();
+ bool has_pairing = devices && !devices->empty();
base::FundamentalValue has_pairing_value(has_pairing);
web_ui()->CallJavascriptFunction(
"BrowserOptions.updateEasyUnlock",
« no previous file with comments | « chrome/browser/signin/easy_unlock_toggle_flow.cc ('k') | chrome/browser/ui/webui/options/easy_unlock_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698