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

Side by Side Diff: chrome/browser/resources/options/browser_options.js

Issue 567643003: easy-unlock: Only show "Set up" UI for en-US. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cr.define('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 var Page = cr.ui.pageManager.Page; 7 var Page = cr.ui.pageManager.Page;
8 var PageManager = cr.ui.pageManager.PageManager; 8 var PageManager = cr.ui.pageManager.PageManager;
9 var ArrayDataModel = cr.ui.ArrayDataModel; 9 var ArrayDataModel = cr.ui.ArrayDataModel;
10 var RepeatingButton = cr.ui.RepeatingButton; 10 var RepeatingButton = cr.ui.RepeatingButton;
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 syncData.hasUnrecoverableError || 1018 syncData.hasUnrecoverableError ||
1019 (!syncData.setupCompleted && !$('sync-action-link').hidden); 1019 (!syncData.setupCompleted && !$('sync-action-link').hidden);
1020 }, 1020 },
1021 1021
1022 /** 1022 /**
1023 * Update the UI depending on whether the current profile has a pairing for 1023 * Update the UI depending on whether the current profile has a pairing for
1024 * Easy Unlock. 1024 * Easy Unlock.
1025 * @param {boolean} hasPairing True if the current profile has a pairing. 1025 * @param {boolean} hasPairing True if the current profile has a pairing.
1026 */ 1026 */
1027 updateEasyUnlock_: function(hasPairing) { 1027 updateEasyUnlock_: function(hasPairing) {
1028 // Hide "Set up" UI when the language is not en-US.
1029 // TODO(xiyuan): Remove this after M38.
1030 if (loadTimeData.getBoolean('easyUnlockAllowed')) {
1031 $('easy-unlock-section').hidden =
1032 !hasPairing && navigator.language != 'en-US';
1033 }
1034
1028 $('easy-unlock-setup').hidden = hasPairing; 1035 $('easy-unlock-setup').hidden = hasPairing;
1029 $('easy-unlock-enable').hidden = !hasPairing; 1036 $('easy-unlock-enable').hidden = !hasPairing;
1030 if (!hasPairing && EasyUnlockTurnOffOverlay.getInstance().visible) { 1037 if (!hasPairing && EasyUnlockTurnOffOverlay.getInstance().visible) {
1031 EasyUnlockTurnOffOverlay.dismiss(); 1038 EasyUnlockTurnOffOverlay.dismiss();
1032 } 1039 }
1033 }, 1040 },
1034 1041
1035 /** 1042 /**
1036 * Update the UI depending on whether the current profile manages any 1043 * Update the UI depending on whether the current profile manages any
1037 * supervised users. 1044 * supervised users.
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 } 2003 }
1997 button.textContent = loadTimeData.getString(strId); 2004 button.textContent = loadTimeData.getString(strId);
1998 }; 2005 };
1999 } 2006 }
2000 2007
2001 // Export 2008 // Export
2002 return { 2009 return {
2003 BrowserOptions: BrowserOptions 2010 BrowserOptions: BrowserOptions
2004 }; 2011 };
2005 }); 2012 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698