| 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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 i18nTemplate.process(document, loadTimeData); | 1057 i18nTemplate.process(document, loadTimeData); |
| 1058 fulfill(true); | 1058 fulfill(true); |
| 1059 }); | 1059 }); |
| 1060 }); | 1060 }); |
| 1061 | 1061 |
| 1062 /** | 1062 /** |
| 1063 * Promise to initialize volume manager. | 1063 * Promise to initialize volume manager. |
| 1064 * @type {!Promise} | 1064 * @type {!Promise} |
| 1065 */ | 1065 */ |
| 1066 var volumeManagerPromise = new Promise(function(fulfill, reject) { | 1066 var volumeManagerPromise = new Promise(function(fulfill, reject) { |
| 1067 var volumeManager = new VolumeManagerWrapper(AllowedPaths.ANY_PATH); | 1067 var volumeManager = new VolumeManagerWrapper(AllowedPaths.ANY_PATH, false); |
| 1068 volumeManager.ensureInitialized(fulfill.bind(null, volumeManager)); | 1068 volumeManager.ensureInitialized(fulfill.bind(null, volumeManager)); |
| 1069 }); | 1069 }); |
| 1070 | 1070 |
| 1071 /** | 1071 /** |
| 1072 * Promise to initialize both the volume manager and the load time data. | 1072 * Promise to initialize both the volume manager and the load time data. |
| 1073 * @type {!Promise} | 1073 * @type {!Promise} |
| 1074 */ | 1074 */ |
| 1075 var initializePromise = | 1075 var initializePromise = |
| 1076 Promise.all([loadTimeDataPromise, volumeManagerPromise]). | 1076 Promise.all([loadTimeDataPromise, volumeManagerPromise]). |
| 1077 then(function(args) { | 1077 then(function(args) { |
| 1078 var volumeManager = args[1]; | 1078 var volumeManager = args[1]; |
| 1079 gallery = new Gallery(volumeManager); | 1079 gallery = new Gallery(volumeManager); |
| 1080 }); | 1080 }); |
| 1081 | 1081 |
| 1082 // Loads entries. | 1082 // Loads entries. |
| 1083 initializePromise.then(reload); | 1083 initializePromise.then(reload); |
| OLD | NEW |