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

Unified Diff: chrome/browser/resources/settings/prefs/prefs.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/prefs/prefs.js
diff --git a/chrome/browser/resources/settings/prefs/prefs.js b/chrome/browser/resources/settings/prefs/prefs.js
index 446c222964e20b9cc038cf069b0420a0042a7235..521892897d5ebc51994985c45f217406d8096c7c 100644
--- a/chrome/browser/resources/settings/prefs/prefs.js
+++ b/chrome/browser/resources/settings/prefs/prefs.js
@@ -29,8 +29,9 @@
if (Array.isArray(val1) || Array.isArray(val2)) {
if (!Array.isArray(val1) || !Array.isArray(val2))
return false;
- return arraysEqual(/** @type {!Array} */(val1),
- /** @type {!Array} */(val2));
+ return arraysEqual(
+ /** @type {!Array} */ (val1),
+ /** @type {!Array} */ (val2));
}
if (val1 instanceof Object && val2 instanceof Object)
@@ -86,8 +87,8 @@
function deepCopy(val) {
if (!(val instanceof Object))
return val;
- return Array.isArray(val) ? deepCopyArray(/** @type {!Array} */(val)) :
- deepCopyObject(val);
+ return Array.isArray(val) ? deepCopyArray(/** @type {!Array} */ (val)) :
+ deepCopyObject(val);
};
/**
@@ -136,7 +137,9 @@
*/
lastPrefValues_: {
type: Object,
- value: function() { return {}; },
+ value: function() {
+ return {};
+ },
},
},
@@ -145,7 +148,7 @@
],
/** @type {SettingsPrivate} */
- settingsApi_: /** @type {SettingsPrivate} */(chrome.settingsPrivate),
+ settingsApi_: /** @type {SettingsPrivate} */ (chrome.settingsPrivate),
created: function() {
if (!CrSettingsPrefs.deferInitialization)
@@ -184,7 +187,7 @@
var key = this.getPrefKeyFromPath_(e.path);
var prefStoreValue = this.lastPrefValues_[key];
- var prefObj = /** @type {chrome.settingsPrivate.PrefObject} */(
+ var prefObj = /** @type {chrome.settingsPrivate.PrefObject} */ (
this.get(key, this.prefs));
// If settingsPrivate already has this value, ignore it. (Otherwise,
@@ -192,8 +195,7 @@
// settingsPrivate.setPref and potentially trigger an IPC loop.)
if (!deepEqual(prefStoreValue, prefObj.value)) {
this.settingsApi_.setPref(
- key,
- prefObj.value,
+ key, prefObj.value,
/* pageId */ '',
/* callback */ this.setPrefCallback_.bind(this, key));
}
@@ -302,7 +304,7 @@
// Remove the listener added in initialize().
this.settingsApi_.onPrefsChanged.removeListener(this.boundPrefsChanged_);
this.settingsApi_ =
- /** @type {SettingsPrivate} */(chrome.settingsPrivate);
+ /** @type {SettingsPrivate} */ (chrome.settingsPrivate);
},
});
})();
« no previous file with comments | « chrome/browser/resources/settings/prefs/pref_util.js ('k') | chrome/browser/resources/settings/prefs/prefs_behavior.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698