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

Side by Side Diff: chrome/browser/resources/settings/device_page/storage.js

Issue 2984843003: MD Settings: Convert all usages of .bind(this) to use ES6 arrow function. (Closed)
Patch Set: Resolve conflicts. Created 3 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 6 * @fileoverview
7 * 'settings-storage' is the settings subpage for storage settings. 7 * 'settings-storage' is the settings subpage for storage settings.
8 */ 8 */
9 cr.exportPath('settings'); 9 cr.exportPath('settings');
10 10
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 this.androidEnabled_ = enabled; 239 this.androidEnabled_ = enabled;
240 }, 240 },
241 241
242 /** 242 /**
243 * Starts periodic update for storage usage. 243 * Starts periodic update for storage usage.
244 * @private 244 * @private
245 */ 245 */
246 startPeriodicUpdate_: function() { 246 startPeriodicUpdate_: function() {
247 // We update the storage usage every 5 seconds. 247 // We update the storage usage every 5 seconds.
248 if (this.updateTimerId_ == -1) { 248 if (this.updateTimerId_ == -1) {
249 this.updateTimerId_ = window.setInterval(function() { 249 this.updateTimerId_ = window.setInterval(() => {
250 if (settings.getCurrentRoute() != settings.routes.STORAGE) { 250 if (settings.getCurrentRoute() != settings.routes.STORAGE) {
251 this.stopPeriodicUpdate_(); 251 this.stopPeriodicUpdate_();
252 return; 252 return;
253 } 253 }
254 chrome.send('updateStorageInfo'); 254 chrome.send('updateStorageInfo');
255 }.bind(this), 5000); 255 }, 5000);
256 } 256 }
257 }, 257 },
258 258
259 /** 259 /**
260 * Stops periodic update for storage usage. 260 * Stops periodic update for storage usage.
261 * @private 261 * @private
262 */ 262 */
263 stopPeriodicUpdate_: function() { 263 stopPeriodicUpdate_: function() {
264 if (this.updateTimerId_ != -1) { 264 if (this.updateTimerId_ != -1) {
265 window.clearInterval(this.updateTimerId_); 265 window.clearInterval(this.updateTimerId_);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 default: 302 default:
303 return ''; 303 return '';
304 } 304 }
305 }, 305 },
306 306
307 /** @private */ 307 /** @private */
308 onCloseDriveCacheDialog_: function() { 308 onCloseDriveCacheDialog_: function() {
309 cr.ui.focusWithoutInk(assert(this.$$('#deleteButton'))); 309 cr.ui.focusWithoutInk(assert(this.$$('#deleteButton')));
310 }, 310 },
311 }); 311 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698