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

Side by Side Diff: ui/file_manager/file_manager/common/js/importer_common.js

Issue 2642743006: Compile file_manager/common and volume_manager_wrapper in v2 syntax. (Closed)
Patch Set: Format. Created 3 years, 11 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 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 // Shared cloud importer namespace 5 // Shared cloud importer namespace
6 var importer = importer || {}; 6 var importer = importer || {};
7 7
8 /** @enum {string} */ 8 /** @enum {string} */
9 importer.ScanEvent = { 9 importer.ScanEvent = {
10 FINALIZED: 'finalized', 10 FINALIZED: 'finalized',
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 * @enum {string} 42 * @enum {string}
43 */ 43 */
44 importer.Setting = { 44 importer.Setting = {
45 HAS_COMPLETED_IMPORT: 'importer-has-completed-import', 45 HAS_COMPLETED_IMPORT: 'importer-has-completed-import',
46 MACHINE_ID: 'importer-machine-id', 46 MACHINE_ID: 'importer-machine-id',
47 PHOTOS_APP_ENABLED: 'importer-photo-app-enabled', 47 PHOTOS_APP_ENABLED: 'importer-photo-app-enabled',
48 LAST_KNOWN_LOG_ID: 'importer-last-known-log-id' 48 LAST_KNOWN_LOG_ID: 'importer-last-known-log-id'
49 }; 49 };
50 50
51 /** 51 /**
52 * @typedef {function(
53 * !importer.ScanEvent, importer.ScanResult)}
54 */
55 importer.ScanObserver;
56
57 /**
58 * Volume types eligible for the affections of Cloud Import. 52 * Volume types eligible for the affections of Cloud Import.
59 * @private @const {!Array<!VolumeManagerCommon.VolumeType>} 53 * @private @const {!Array<!VolumeManagerCommon.VolumeType>}
60 */ 54 */
61 importer.ELIGIBLE_VOLUME_TYPES_ = [ 55 importer.ELIGIBLE_VOLUME_TYPES_ = [
62 VolumeManagerCommon.VolumeType.MTP, 56 VolumeManagerCommon.VolumeType.MTP,
63 VolumeManagerCommon.VolumeType.REMOVABLE 57 VolumeManagerCommon.VolumeType.REMOVABLE
64 ]; 58 ];
65 59
66 /** 60 /**
67 * Root dir names for valid import locations. 61 * Root dir names for valid import locations.
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 960
967 /** 961 /**
968 * Fetch analytics.Tracker from background page. 962 * Fetch analytics.Tracker from background page.
969 * @return {!Promise<!analytics.Tracker>} 963 * @return {!Promise<!analytics.Tracker>}
970 * @private 964 * @private
971 */ 965 */
972 importer.getTracker_ = function() { 966 importer.getTracker_ = function() {
973 return new Promise( 967 return new Promise(
974 function(resolve, reject) { 968 function(resolve, reject) {
975 chrome.runtime.getBackgroundPage( 969 chrome.runtime.getBackgroundPage(
976 /** @param {Window=} opt_background */ 970 function(/** BackgroundWindow */ opt_background) {
977 function(opt_background) {
978 if (chrome.runtime.lastError) { 971 if (chrome.runtime.lastError) {
979 reject(chrome.runtime.lastError); 972 reject(chrome.runtime.lastError);
980 } 973 }
981 opt_background.background.ready( 974 opt_background.background.ready(
982 function() { 975 function() {
983 resolve(opt_background.background.tracker); 976 resolve(opt_background.background.tracker);
984 }); 977 });
985 }); 978 });
986 }); 979 });
987 }; 980 };
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 }); 1092 });
1100 }; 1093 };
1101 1094
1102 /** @private @const {!importer.ChromeLocalStorage} */ 1095 /** @private @const {!importer.ChromeLocalStorage} */
1103 importer.ChromeLocalStorage.INSTANCE_ = new importer.ChromeLocalStorage(); 1096 importer.ChromeLocalStorage.INSTANCE_ = new importer.ChromeLocalStorage();
1104 1097
1105 /** @return {!importer.ChromeLocalStorage} */ 1098 /** @return {!importer.ChromeLocalStorage} */
1106 importer.ChromeLocalStorage.getInstance = function() { 1099 importer.ChromeLocalStorage.getInstance = function() {
1107 return importer.ChromeLocalStorage.INSTANCE_; 1100 return importer.ChromeLocalStorage.INSTANCE_;
1108 }; 1101 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698