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

Side by Side Diff: ui/file_manager/file_manager/background/js/media_import_handler.js

Issue 1020003004: Files.app: Fix a jscompiler error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Namespace 5 // Namespace
6 var importer = importer || {}; 6 var importer = importer || {};
7 7
8 /** 8 /**
9 * Interface providing access to information about active import processes. 9 * Interface providing access to information about active import processes.
10 * 10 *
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 * @param {Object=} updateInfo 153 * @param {Object=} updateInfo
154 */ 154 */
155 importer.MediaImportHandler.prototype.onFileImported_ = 155 importer.MediaImportHandler.prototype.onFileImported_ =
156 function(task, updateType, updateInfo) { 156 function(task, updateType, updateInfo) {
157 if (updateType !== 157 if (updateType !==
158 importer.MediaImportHandler.ImportTask.UpdateType.ENTRY_CHANGED) { 158 importer.MediaImportHandler.ImportTask.UpdateType.ENTRY_CHANGED) {
159 return; 159 return;
160 } 160 }
161 // Update info must exist for ENTRY_CHANGED notifications. 161 // Update info must exist for ENTRY_CHANGED notifications.
162 console.assert(updateInfo && updateInfo.destination); 162 console.assert(updateInfo && updateInfo.destination);
163 /** @type {!importer.MediaImportHandler.ImportTask.EntryChangedInfo} */ 163 var info =
164 var info = updateInfo; 164 /** @type {!importer.MediaImportHandler.ImportTask.EntryChangedInfo} */ (
165 updateInfo);
165 166
166 // Tag the import with a private drive property. 167 // Tag the import with a private drive property.
167 chrome.fileManagerPrivate.setEntryTag( 168 chrome.fileManagerPrivate.setEntryTag(
168 info.destination.toURL(), 169 info.destination.toURL(),
169 'private', // Scoped to just this app. 170 'private', // Scoped to just this app.
170 importer.MediaImportHandler.IMPORTS_TAG_KEY, 171 importer.MediaImportHandler.IMPORTS_TAG_KEY,
171 importer.MediaImportHandler.IMPORTS_TAG_VALUE, 172 importer.MediaImportHandler.IMPORTS_TAG_VALUE,
172 function() { 173 function() {
173 if (chrome.runtime.lastError) { 174 if (chrome.runtime.lastError) {
174 console.error('Unable to tag imported media: ' + 175 console.error('Unable to tag imported media: ' +
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 metrics.ImportEvents.FILES_DEDUPLICATED 528 metrics.ImportEvents.FILES_DEDUPLICATED
528 .label(disposition) 529 .label(disposition)
529 .value(count)); 530 .value(count));
530 }.bind(this)); 531 }.bind(this));
531 532
532 this.tracker_.send( 533 this.tracker_.send(
533 metrics.ImportEvents.FILES_DEDUPLICATED 534 metrics.ImportEvents.FILES_DEDUPLICATED
534 .label('all-duplicates') 535 .label('all-duplicates')
535 .value(totalDeduped)); 536 .value(totalDeduped));
536 }; 537 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698