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

Unified Diff: chrome/browser/resources/settings/site_settings/site_settings_behavior.js

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/site_settings/site_settings_behavior.js
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_behavior.js b/chrome/browser/resources/settings/site_settings/site_settings_behavior.js
index 8c07d7e7501b34452692d7b88952d12d5adb6326..fd4bad0dd413e74f4d0b85e17b3e97d32e38df3e 100644
--- a/chrome/browser/resources/settings/site_settings/site_settings_behavior.js
+++ b/chrome/browser/resources/settings/site_settings/site_settings_behavior.js
@@ -117,7 +117,7 @@ var SiteSettingsBehaviorImpl = {
}
return showRecommendation ?
loadTimeData.getString(
- 'siteSettingsAllowRecentlyClosedSitesRecommended') :
+ 'siteSettingsAllowRecentlyClosedSitesRecommended') :
loadTimeData.getString('siteSettingsAllowRecentlyClosedSites');
case settings.ContentSettingsTypes.AUTOMATIC_DOWNLOADS:
// "Ask when a site wants to auto-download multiple" vs "Do not allow".
@@ -148,7 +148,8 @@ var SiteSettingsBehaviorImpl = {
* @return {string} The URL with a scheme, or an empty string.
*/
ensureUrlHasScheme: function(url) {
- if (url.length == 0) return url;
+ if (url.length == 0)
+ return url;
return url.includes('://') ? url : 'http://' + url;
},
@@ -163,8 +164,7 @@ var SiteSettingsBehaviorImpl = {
urlWithScheme.endsWith(':443')) {
return url.slice(0, -4);
}
- if (urlWithScheme.startsWith('http://') &&
- urlWithScheme.endsWith(':80')) {
+ if (urlWithScheme.startsWith('http://') && urlWithScheme.endsWith(':80')) {
return url.slice(0, -3);
}
return url;

Powered by Google App Engine
This is Rietveld 408576698