Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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') | |
|
Dan Beam
2017/05/25 00:17:01
nit: curlies
dschuyler
2017/05/25 00:43:58
Done.
| |
| 172 enforcement = chrome.settingsPrivate.Enforcement.ENFORCED; | 173 enforcement = chrome.settingsPrivate.Enforcement.ENFORCED; |
| 173 | 174 |
| 174 var controlledBy = kControlledByLookup[exception.source] || ''; | 175 var controlledBy = kControlledByLookup[exception.source] || ''; |
| 175 | 176 |
| 176 return { | 177 return { |
| 177 category: this.category, | 178 category: this.category, |
| 178 origin: origin, | 179 origin: origin, |
| 179 displayName: exception.displayName, | 180 displayName: exception.displayName, |
| 180 embeddingOrigin: embeddingOrigin, | 181 embeddingOrigin: embeddingOrigin, |
| 181 embeddingDisplayName: embeddingDisplayName, | 182 embeddingDisplayName: embeddingDisplayName, |
| 182 incognito: exception.incognito, | 183 incognito: exception.incognito, |
| 183 setting: exception.setting, | 184 setting: exception.setting, |
| 184 enforcement: enforcement, | 185 enforcement: enforcement, |
| 185 controlledBy: controlledBy, | 186 controlledBy: controlledBy, |
| 186 }; | 187 }; |
| 187 }, | 188 }, |
| 188 | 189 |
| 189 }; | 190 }; |
| 190 | 191 |
| 191 /** @polymerBehavior */ | 192 /** @polymerBehavior */ |
| 192 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl]; | 193 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl]; |
| OLD | NEW |