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

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

Issue 1867363003: Better support for patterns. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed one Created 4 years, 8 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 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 return loadTimeData.getString('siteSettingsDontShowImages'); 277 return loadTimeData.getString('siteSettingsDontShowImages');
278 } 278 }
279 return showRecommendation ? 279 return showRecommendation ?
280 loadTimeData.getString('siteSettingsShowAllRecommended') : 280 loadTimeData.getString('siteSettingsShowAllRecommended') :
281 loadTimeData.getString('siteSettingsShowAll'); 281 loadTimeData.getString('siteSettingsShowAll');
282 default: 282 default:
283 assertNotReached(); 283 assertNotReached();
284 return ''; 284 return '';
285 } 285 }
286 }, 286 },
287
288 /**
289 * Ensures the URL has a scheme (assumes http if omitted).
290 * @param {string} url The URL with or without a scheme.
291 * @return {string} The URL with a scheme.
michaelpg 2016/04/11 03:55:35 ... or the empty string
Finnur 2016/04/11 11:45:33 Done.
292 */
293 ensureUrlHasScheme: function(url) {
294 if (url.length == 0) return url;
295 return url.indexOf('://') != -1 ? url : 'http://' + url;
michaelpg 2016/04/11 03:55:35 url.includes
Finnur 2016/04/11 11:45:33 Done.
296 },
287 }; 297 };
288 298
289 /** @polymerBehavior */ 299 /** @polymerBehavior */
290 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl]; 300 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698