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

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

Issue 152143009: Clarify settings UI in multi-profiles mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
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 Preferences = options.Preferences; 6 var Preferences = options.Preferences;
7 7
8 /** 8 /**
9 * A controlled setting indicator that can be placed on a setting as an 9 * A controlled setting indicator that can be placed on a setting as an
10 * indicator that the value is controlled by some external entity such as 10 * indicator that the value is controlled by some external entity such as
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 var self = this; 98 var self = this;
99 99
100 // Construct the bubble text. 100 // Construct the bubble text.
101 if (this.hasAttribute('plural')) { 101 if (this.hasAttribute('plural')) {
102 var defaultStrings = { 102 var defaultStrings = {
103 'policy': loadTimeData.getString('controlledSettingsPolicy'), 103 'policy': loadTimeData.getString('controlledSettingsPolicy'),
104 'extension': loadTimeData.getString('controlledSettingsExtension'), 104 'extension': loadTimeData.getString('controlledSettingsExtension'),
105 'extensionWithName': loadTimeData.getString( 105 'extensionWithName': loadTimeData.getString(
106 'controlledSettingsExtensionWithName'), 106 'controlledSettingsExtensionWithName'),
107 }; 107 };
108 if (cr.isChromeOS) {
109 defaultStrings['shared'] =
Dan Beam 2014/02/12 21:56:31 s/['shared']/.shared/
michaelpg 2014/02/13 02:15:23 Done.
110 loadTimeData.getString('controlledSettingsShared');
111 }
108 } else { 112 } else {
109 var defaultStrings = { 113 var defaultStrings = {
110 'policy': loadTimeData.getString('controlledSettingPolicy'), 114 'policy': loadTimeData.getString('controlledSettingPolicy'),
111 'extension': loadTimeData.getString('controlledSettingExtension'), 115 'extension': loadTimeData.getString('controlledSettingExtension'),
112 'extensionWithName': loadTimeData.getString( 116 'extensionWithName': loadTimeData.getString(
113 'controlledSettingExtensionWithName'), 117 'controlledSettingExtensionWithName'),
114 'recommended': 118 'recommended':
115 loadTimeData.getString('controlledSettingRecommended'), 119 loadTimeData.getString('controlledSettingRecommended'),
116 'hasRecommendation': 120 'hasRecommendation':
117 loadTimeData.getString('controlledSettingHasRecommendation'), 121 loadTimeData.getString('controlledSettingHasRecommendation'),
118 }; 122 };
119 if (cr.isChromeOS) { 123 if (cr.isChromeOS) {
120 defaultStrings.owner = 124 defaultStrings['owner'] =
Dan Beam 2014/02/12 21:56:31 revert
michaelpg 2014/02/13 02:15:23 Done.
121 loadTimeData.getString('controlledSettingOwner'); 125 loadTimeData.getString('controlledSettingOwner');
126 defaultStrings['shared'] =
127 loadTimeData.getString('controlledSettingShared');
Dan Beam 2014/02/12 21:56:31 s/['shared']/.shared/
michaelpg 2014/02/13 02:15:23 Done.
122 } 128 }
123 } 129 }
124 130
125 // No controller, no bubble. 131 // No controller, no bubble.
126 if (!this.controlledBy || !(this.controlledBy in defaultStrings)) 132 if (!this.controlledBy || !(this.controlledBy in defaultStrings))
127 return; 133 return;
128 134
129 var text = defaultStrings[this.controlledBy]; 135 var text = defaultStrings[this.controlledBy];
130 if (this.controlledBy == 'extension' && this.extensionName) 136 if (this.controlledBy == 'extension' && this.extensionName)
131 text = defaultStrings.extensionWithName; 137 text = defaultStrings.extensionWithName;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 cr.PropertyKind.ATTR); 220 cr.PropertyKind.ATTR);
215 221
216 /** 222 /**
217 * The status of the associated preference: 223 * The status of the associated preference:
218 * - 'policy': A specific value is enfoced by policy. 224 * - 'policy': A specific value is enfoced by policy.
219 * - 'extension': A specific value is enforced by an extension. 225 * - 'extension': A specific value is enforced by an extension.
220 * - 'recommended': A value is recommended by policy. The user could 226 * - 'recommended': A value is recommended by policy. The user could
221 * override this recommendation but has not done so. 227 * override this recommendation but has not done so.
222 * - 'hasRecommendation': A value is recommended by policy. The user has 228 * - 'hasRecommendation': A value is recommended by policy. The user has
223 * overridden this recommendation. 229 * overridden this recommendation.
230 * - 'owner': A value is controlled by the owner of the device
231 * (Chrome OS only).
232 * - 'shared': A value belongs to the primary user but can be
233 * modified (Chrome OS only).
224 * - unset: The value is controlled by the user alone. 234 * - unset: The value is controlled by the user alone.
225 * @type {string} 235 * @type {string}
226 */ 236 */
227 cr.defineProperty(ControlledSettingIndicator, 'controlledBy', 237 cr.defineProperty(ControlledSettingIndicator, 'controlledBy',
228 cr.PropertyKind.ATTR); 238 cr.PropertyKind.ATTR);
229 239
230 // Export. 240 // Export.
231 return { 241 return {
232 ControlledSettingIndicator: ControlledSettingIndicator 242 ControlledSettingIndicator: ControlledSettingIndicator
233 }; 243 };
234 }); 244 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698