| 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 if (chrome.extension) { | 5 if (chrome.extension) { |
| 6 function getContentWindows() { | 6 function getContentWindows() { |
| 7 return chrome.extension.getViews(); | 7 return chrome.extension.getViews(); |
| 8 } | 8 } |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 onStartTransfer(); | 909 onStartTransfer(); |
| 910 sourceEntry.copyTo(dirEntry, fileName, onSuccessTransfer, | 910 sourceEntry.copyTo(dirEntry, fileName, onSuccessTransfer, |
| 911 onFailTransfer); | 911 onFailTransfer); |
| 912 }, | 912 }, |
| 913 onFilesystemError); | 913 onFilesystemError); |
| 914 return; | 914 return; |
| 915 } | 915 } |
| 916 | 916 |
| 917 function onFileTransferCompleted() { | 917 function onFileTransferCompleted() { |
| 918 self.cancelCallback_ = null; | 918 self.cancelCallback_ = null; |
| 919 if (chrome.extension.lastError) { | 919 if (chrome.runtime.lastError) { |
| 920 onFailTransfer({ | 920 onFailTransfer({ |
| 921 code: chrome.extension.lastError.message, | 921 code: chrome.runtime.lastError.message, |
| 922 toGDrive: task.targetOnGData, | 922 toGDrive: task.targetOnGData, |
| 923 sourceFileUrl: sourceFileUrl | 923 sourceFileUrl: sourceFileUrl |
| 924 }); | 924 }); |
| 925 } else { | 925 } else { |
| 926 targetDirEntry.getFile(targetRelativePath, {}, onSuccessTransfer, | 926 targetDirEntry.getFile(targetRelativePath, {}, onSuccessTransfer, |
| 927 onFailTransfer); | 927 onFailTransfer); |
| 928 } | 928 } |
| 929 } | 929 } |
| 930 | 930 |
| 931 self.cancelCallback_ = function() { | 931 self.cancelCallback_ = function() { |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1254 */ | 1254 */ |
| 1255 FileCopyManager.prototype.sendDeleteEvent_ = function(task, reason) { | 1255 FileCopyManager.prototype.sendDeleteEvent_ = function(task, reason) { |
| 1256 this.sendEvent_('delete', { | 1256 this.sendEvent_('delete', { |
| 1257 reason: reason, | 1257 reason: reason, |
| 1258 id: task.id, | 1258 id: task.id, |
| 1259 urls: task.entries.map(function(e) { | 1259 urls: task.entries.map(function(e) { |
| 1260 return util.makeFilesystemUrl(e.fullPath); | 1260 return util.makeFilesystemUrl(e.fullPath); |
| 1261 }) | 1261 }) |
| 1262 }); | 1262 }); |
| 1263 }; | 1263 }; |
| OLD | NEW |