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

Side by Side Diff: chrome/browser/resources/settings/languages_page/language_detail_page.js

Issue 1391433003: Extract policy indicator behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_521791_network_indicators_a
Patch Set: Feedback Created 5 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 'settings-language-detail-page' is a sub-page for editing 6 * @fileoverview 'settings-language-detail-page' is a sub-page for editing
7 * an individual language's settings. 7 * an individual language's settings.
8 * 8 *
9 * @group Chrome Settings Elements 9 * @group Chrome Settings Elements
10 * @element settings-language-detail-page 10 * @element settings-language-detail-page
(...skipping 21 matching lines...) Expand all
32 * The language to display the details for. 32 * The language to display the details for.
33 * @type {LanguageInfo|undefined} 33 * @type {LanguageInfo|undefined}
34 */ 34 */
35 detail: Object, 35 detail: Object,
36 }, 36 },
37 37
38 ready: function() { 38 ready: function() {
39 // In a CrOS multi-user session, the primary user controls the UI language. 39 // In a CrOS multi-user session, the primary user controls the UI language.
40 if (this.isSecondaryUser_()) { 40 if (this.isSecondaryUser_()) {
41 var indicator = this.$.policyIndicator; 41 var indicator = this.$.policyIndicator;
42 indicator.indicatorType = CrPolicyIndicator.Type.PRIMARY_USER; 42 indicator.indicatorType = CrPolicyIndicatorType.PRIMARY_USER;
43 indicator.controllingUser = loadTimeData.getString('primaryUserEmail'); 43 indicator.controllingUser = loadTimeData.getString('primaryUserEmail');
44 } 44 }
45 45
46 // The UI language choice doesn't persist for guests. 46 // The UI language choice doesn't persist for guests.
47 if (cr.isChromeOS && 47 if (cr.isChromeOS &&
48 (uiAccountTweaks.UIAccountTweaks.loggedInAsGuest() || 48 (uiAccountTweaks.UIAccountTweaks.loggedInAsGuest() ||
49 uiAccountTweaks.UIAccountTweaks.loggedInAsPublicAccount())) { 49 uiAccountTweaks.UIAccountTweaks.loggedInAsPublicAccount())) {
50 this.$.languageSettings.hidden = true; 50 this.$.languageSettings.hidden = true;
51 } 51 }
52 }, 52 },
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 }, 160 },
161 161
162 /** 162 /**
163 * Handler for the restart button. 163 * Handler for the restart button.
164 * @private 164 * @private
165 */ 165 */
166 onRestartTap_: function() { 166 onRestartTap_: function() {
167 chrome.send('restart'); 167 chrome.send('restart');
168 }, 168 },
169 }); 169 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698