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

Side by Side Diff: chrome/browser/resources/file_manager/background/js/volume_manager.js

Issue 98493003: Simplify fileBrowserPrivate.getDriveConnectionStatus(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the util function name. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Represents each volume, such as "drive", "download directory", each "USB 8 * Represents each volume, such as "drive", "download directory", each "USB
9 * flush storage", or "mounted zip archive" etc. 9 * flush storage", or "mounted zip archive" etc.
10 * 10 *
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 /** 326 /**
327 * The list of VolumeInfo instances for each mounted volume. 327 * The list of VolumeInfo instances for each mounted volume.
328 * @type {VolumeInfoList} 328 * @type {VolumeInfoList}
329 */ 329 */
330 this.volumeInfoList = new VolumeInfoList(); 330 this.volumeInfoList = new VolumeInfoList();
331 331
332 // The status should be merged into VolumeManager. 332 // The status should be merged into VolumeManager.
333 // TODO(hidehiko): Remove them after the migration. 333 // TODO(hidehiko): Remove them after the migration.
334 this.driveConnectionState_ = { 334 this.driveConnectionState_ = {
335 type: util.DriveConnectionType.OFFLINE, 335 type: util.DriveConnectionType.OFFLINE,
336 reasons: [util.DriveConnectionReason.NO_SERVICE] 336 reason: util.DriveConnectionReason.NO_SERVICE
337 }; 337 };
338 338
339 chrome.fileBrowserPrivate.onDriveConnectionStatusChanged.addListener( 339 chrome.fileBrowserPrivate.onDriveConnectionStatusChanged.addListener(
340 this.onDriveConnectionStatusChanged_.bind(this)); 340 this.onDriveConnectionStatusChanged_.bind(this));
341 this.onDriveConnectionStatusChanged_(); 341 this.onDriveConnectionStatusChanged_();
342 } 342 }
343 343
344 /** 344 /**
345 * Invoked when the drive connection status is changed. 345 * Invoked when the drive connection status is changed.
346 * @private_ 346 * @private_
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 callbacks[i].apply(self, args); 705 callbacks[i].apply(self, args);
706 } 706 }
707 }; 707 };
708 if (status === 'success') { 708 if (status === 'success') {
709 callEach(request.successCallbacks, this, [opt_mountPath]); 709 callEach(request.successCallbacks, this, [opt_mountPath]);
710 } else { 710 } else {
711 volumeManagerUtil.validateError(status); 711 volumeManagerUtil.validateError(status);
712 callEach(request.errorCallbacks, this, [status]); 712 callEach(request.errorCallbacks, this, [status]);
713 } 713 }
714 }; 714 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698