| OLD | NEW |
| 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 * This variable is checked in SelectFileDialogExtensionBrowserTest. | 8 * This variable is checked in SelectFileDialogExtensionBrowserTest. |
| 9 * @type {number} | 9 * @type {number} |
| 10 */ | 10 */ |
| (...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 return; | 1353 return; |
| 1354 } | 1354 } |
| 1355 if (this.volumeManager_.isMounted(RootDirectory.DRIVE)) { | 1355 if (this.volumeManager_.isMounted(RootDirectory.DRIVE)) { |
| 1356 this.finishSetupCurrentDirectory_(path, invokeHandlers); | 1356 this.finishSetupCurrentDirectory_(path, invokeHandlers); |
| 1357 return; | 1357 return; |
| 1358 } | 1358 } |
| 1359 if (pageLoading) | 1359 if (pageLoading) |
| 1360 this.delayShow_(500); | 1360 this.delayShow_(500); |
| 1361 // Reflect immediatelly in the UI we are on Drive and display | 1361 // Reflect immediatelly in the UI we are on Drive and display |
| 1362 // mounting UI. | 1362 // mounting UI. |
| 1363 this.directoryModel_.setupPath(RootDirectory.DRIVE); | 1363 this.directoryModel_.setupPath(path); |
| 1364 | 1364 |
| 1365 if (!this.isOnDrive()) { | 1365 if (!this.isOnDrive()) { |
| 1366 // Since DRIVE is not mounted it should be resolved synchronously | 1366 // Since DRIVE is not mounted it should be resolved synchronously |
| 1367 // (no need in asynchronous calls to filesystem API). It is important | 1367 // (no need in asynchronous calls to filesystem API). It is important |
| 1368 // to prevent race condition. | 1368 // to prevent race condition. |
| 1369 console.error('Expected path set up synchronously'); | 1369 console.error('Expected path set up synchronously'); |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 var self = this; | 1372 var self = this; |
| 1373 this.volumeManager_.mountDrive(function() { | 1373 this.volumeManager_.mountDrive(function() { |
| (...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3409 callback(this.preferences_); | 3409 callback(this.preferences_); |
| 3410 return; | 3410 return; |
| 3411 } | 3411 } |
| 3412 | 3412 |
| 3413 chrome.fileBrowserPrivate.getPreferences(function(prefs) { | 3413 chrome.fileBrowserPrivate.getPreferences(function(prefs) { |
| 3414 this.preferences_ = prefs; | 3414 this.preferences_ = prefs; |
| 3415 callback(prefs); | 3415 callback(prefs); |
| 3416 }.bind(this)); | 3416 }.bind(this)); |
| 3417 }; | 3417 }; |
| 3418 })(); | 3418 })(); |
| OLD | NEW |