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

Unified Diff: chrome/browser/resources/md_history/app.js

Issue 2597573002: MD History/Downloads: convert .bind(this) and function property values to use => (Closed)
Patch Set: Created 4 years 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/md_history/app.js
diff --git a/chrome/browser/resources/md_history/app.js b/chrome/browser/resources/md_history/app.js
index 2a39a590c126be704e4574fc8cbd801048daf089..a407cd8de3d512bd252fa5dba436637aa06193ea 100644
--- a/chrome/browser/resources/md_history/app.js
+++ b/chrome/browser/resources/md_history/app.js
@@ -41,33 +41,29 @@ Polymer({
/** @type {!QueryState} */
queryState_: {
type: Object,
- value: function() {
- return {
- // Whether the most recent query was incremental.
- incremental: false,
- // A query is initiated by page load.
- querying: true,
- queryingDisabled: false,
- _range: HistoryRange.ALL_TIME,
- searchTerm: '',
- groupedOffset: 0,
-
- set range(val) { this._range = Number(val); },
- get range() { return this._range; },
- };
- }
+ value: () => ({
+ // Whether the most recent query was incremental.
+ incremental: false,
+ // A query is initiated by page load.
+ querying: true,
+ queryingDisabled: false,
+ _range: HistoryRange.ALL_TIME,
+ searchTerm: '',
+ groupedOffset: 0,
+
+ set range(val) { this._range = Number(val); },
+ get range() { return this._range; },
+ }),
},
/** @type {!QueryResult} */
queryResult_: {
type: Object,
- value: function() {
- return {
- info: null,
- results: null,
- sessionList: null,
- };
- }
+ value: () => ({
+ info: null,
+ results: null,
+ sessionList: null,
+ }),
},
// True if the window is narrow enough for the page to have a drawer.
@@ -88,9 +84,7 @@ Polymer({
showMenuPromo_: {
type: Boolean,
- value: function() {
- return loadTimeData.getBoolean('showMenuPromo');
- },
+ value: () => loadTimeData.getBoolean('showMenuPromo'),
},
},
@@ -329,8 +323,8 @@ Polymer({
historyViewChanged_: function() {
// This allows the synced-device-manager to render so that it can be set as
// the scroll target.
- requestAnimationFrame(function() {
- md_history.ensureLazyLoaded().then(function() {
+ requestAnimationFrame(() => {
+ md_history.ensureLazyLoaded().then(() => {
// <iron-pages> can occasionally end up with no item selected during
// tests.
if (!this.$.content.selectedItem)
@@ -338,8 +332,8 @@ Polymer({
this.scrollTarget =
this.$.content.selectedItem.getContentScrollTarget();
this._scrollHandler();
- }.bind(this));
- }.bind(this));
+ });
+ });
this.recordHistoryPageView_();
},

Powered by Google App Engine
This is Rietveld 408576698