| 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 /** @polymerBehavior */ | 9 /** @polymerBehavior */ |
| 10 var SiteSettingsBehaviorImpl = { | 10 var SiteSettingsBehaviorImpl = { |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 return pattern.replace('http://[*.]', 'http://'); | 355 return pattern.replace('http://[*.]', 'http://'); |
| 356 else if (pattern.startsWith('https://[*.]')) | 356 else if (pattern.startsWith('https://[*.]')) |
| 357 return pattern.replace('https://[*.]', 'https://'); | 357 return pattern.replace('https://[*.]', 'https://'); |
| 358 else if (pattern.startsWith('[*.]')) | 358 else if (pattern.startsWith('[*.]')) |
| 359 return pattern.substring(4, pattern.length); | 359 return pattern.substring(4, pattern.length); |
| 360 return pattern; | 360 return pattern; |
| 361 }, | 361 }, |
| 362 | 362 |
| 363 /** | 363 /** |
| 364 * Returns the icon to use for a given site. | 364 * Returns the icon to use for a given site. |
| 365 * @param {SiteException} site The url of the site to fetch the icon for. | 365 * @param {string} site The url of the site to fetch the icon for. |
| 366 * @return {string} The background-image style with the favicon. | 366 * @return {string} The background-image style with the favicon. |
| 367 * @private | 367 * @private |
| 368 */ | 368 */ |
| 369 computeSiteIcon: function(site) { | 369 computeSiteIcon: function(site) { |
| 370 var url = this.ensureUrlHasScheme(site.originForDisplay); | 370 var url = this.ensureUrlHasScheme(site); |
| 371 return 'background-image: ' + cr.icon.getFaviconImageSet(url); | 371 return 'background-image: ' + cr.icon.getFaviconImageSet(url); |
| 372 }, | 372 }, |
| 373 }; | 373 }; |
| 374 | 374 |
| 375 /** @polymerBehavior */ | 375 /** @polymerBehavior */ |
| 376 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl]; | 376 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl]; |
| OLD | NEW |