| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * Overrided metadata worker's path. | 6 * Overrided metadata worker's path. |
| 7 * @type {string} | 7 * @type {string} |
| 8 */ | 8 */ |
| 9 ContentMetadataProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; | 9 ContentMetadataProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; |
| 10 | 10 |
| (...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 i18nTemplate.process(document, loadTimeData); | 1052 i18nTemplate.process(document, loadTimeData); |
| 1053 fulfill(true); | 1053 fulfill(true); |
| 1054 }); | 1054 }); |
| 1055 }); | 1055 }); |
| 1056 | 1056 |
| 1057 /** | 1057 /** |
| 1058 * Promise to initialize volume manager. | 1058 * Promise to initialize volume manager. |
| 1059 * @type {!Promise} | 1059 * @type {!Promise} |
| 1060 */ | 1060 */ |
| 1061 var volumeManagerPromise = new Promise(function(fulfill, reject) { | 1061 var volumeManagerPromise = new Promise(function(fulfill, reject) { |
| 1062 var volumeManager = new VolumeManagerWrapper( | 1062 var volumeManager = new VolumeManagerWrapper(AllowedPaths.ANY_PATH); |
| 1063 VolumeManagerWrapper.NonNativeVolumeStatus.ENABLED); | |
| 1064 volumeManager.ensureInitialized(fulfill.bind(null, volumeManager)); | 1063 volumeManager.ensureInitialized(fulfill.bind(null, volumeManager)); |
| 1065 }); | 1064 }); |
| 1066 | 1065 |
| 1067 /** | 1066 /** |
| 1068 * Promise to initialize both the volume manager and the load time data. | 1067 * Promise to initialize both the volume manager and the load time data. |
| 1069 * @type {!Promise} | 1068 * @type {!Promise} |
| 1070 */ | 1069 */ |
| 1071 var initializePromise = | 1070 var initializePromise = |
| 1072 Promise.all([loadTimeDataPromise, volumeManagerPromise]). | 1071 Promise.all([loadTimeDataPromise, volumeManagerPromise]). |
| 1073 then(function(args) { | 1072 then(function(args) { |
| 1074 var volumeManager = args[1]; | 1073 var volumeManager = args[1]; |
| 1075 gallery = new Gallery(volumeManager); | 1074 gallery = new Gallery(volumeManager); |
| 1076 }); | 1075 }); |
| 1077 | 1076 |
| 1078 // Loads entries. | 1077 // Loads entries. |
| 1079 initializePromise.then(reload); | 1078 initializePromise.then(reload); |
| OLD | NEW |