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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_settings_behavior.js

Issue 2902313002: [MD settings] show controlledBy icon for HostApp and platform_app exceptions (Closed)
Patch Set: added braces Created 3 years, 7 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 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 Behavior common to Site Settings classes. 6 * @fileoverview Behavior common to Site Settings classes.
7 */ 7 */
8 8
9 9
10 /** 10 /**
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 expandSiteException: function(exception) { 161 expandSiteException: function(exception) {
162 var origin = exception.origin; 162 var origin = exception.origin;
163 var embeddingOrigin = exception.embeddingOrigin; 163 var embeddingOrigin = exception.embeddingOrigin;
164 var embeddingDisplayName = ''; 164 var embeddingDisplayName = '';
165 if (origin != embeddingOrigin) { 165 if (origin != embeddingOrigin) {
166 embeddingDisplayName = 166 embeddingDisplayName =
167 this.getEmbedderString(embeddingOrigin, this.category); 167 this.getEmbedderString(embeddingOrigin, this.category);
168 } 168 }
169 169
170 var enforcement = ''; 170 var enforcement = '';
171 if (exception.source == 'policy' || exception.source == 'extension') 171 if (exception.source == 'extension' || exception.source == 'HostedApp' ||
172 exception.source == 'platform_app' || exception.source == 'policy') {
172 enforcement = chrome.settingsPrivate.Enforcement.ENFORCED; 173 enforcement = chrome.settingsPrivate.Enforcement.ENFORCED;
174 }
173 175
174 var controlledBy = kControlledByLookup[exception.source] || ''; 176 var controlledBy = kControlledByLookup[exception.source] || '';
175 177
176 return { 178 return {
177 category: this.category, 179 category: this.category,
178 origin: origin, 180 origin: origin,
179 displayName: exception.displayName, 181 displayName: exception.displayName,
180 embeddingOrigin: embeddingOrigin, 182 embeddingOrigin: embeddingOrigin,
181 embeddingDisplayName: embeddingDisplayName, 183 embeddingDisplayName: embeddingDisplayName,
182 incognito: exception.incognito, 184 incognito: exception.incognito,
183 setting: exception.setting, 185 setting: exception.setting,
184 enforcement: enforcement, 186 enforcement: enforcement,
185 controlledBy: controlledBy, 187 controlledBy: controlledBy,
186 }; 188 };
187 }, 189 },
188 190
189 }; 191 };
190 192
191 /** @polymerBehavior */ 193 /** @polymerBehavior */
192 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl]; 194 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl];
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