Commit e84844e2 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[dragdrop] Clean file_transfer_controller.js whitespace

Remove a stray extra line. Add some in canPasteOrDrop_ to end the code
squishing competition and instead promote code readability.

No change in behavior, no new tests.

Tbr: (mr-no-nbn) adanilo
Bug: 1002394
Change-Id: I038646234385c7b0dd73b72752f8c5a160e70877
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2275161
Commit-Queue: Alex Danilo <adanilo@chromium.org>
Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
Auto-Submit: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#784315}
parent 969a2f3f
...@@ -1279,18 +1279,22 @@ class FileTransferController { ...@@ -1279,18 +1279,22 @@ class FileTransferController {
if (!clipboardData) { if (!clipboardData) {
return false; return false;
} }
if (!destinationEntry) { if (!destinationEntry) {
return false; return false;
} }
const destinationLocationInfo = const destinationLocationInfo =
this.volumeManager_.getLocationInfo(destinationEntry); this.volumeManager_.getLocationInfo(destinationEntry);
if (!destinationLocationInfo || destinationLocationInfo.isReadOnly) { if (!destinationLocationInfo || destinationLocationInfo.isReadOnly) {
return false; return false;
} }
if (destinationLocationInfo.volumeInfo && if (destinationLocationInfo.volumeInfo &&
destinationLocationInfo.volumeInfo.error) { destinationLocationInfo.volumeInfo.error) {
return false; return false;
} }
if (!clipboardData.types || clipboardData.types.indexOf('fs/tag') === -1) { if (!clipboardData.types || clipboardData.types.indexOf('fs/tag') === -1) {
return false; // Unsupported type of content. return false; // Unsupported type of content.
} }
...@@ -1712,7 +1716,6 @@ FileTransferController.PastePlan = class { ...@@ -1712,7 +1716,6 @@ FileTransferController.PastePlan = class {
} }
}; };
/** /**
* Converts list of urls to list of Entries with granting R/W permissions to * Converts list of urls to list of Entries with granting R/W permissions to
* them, which is essential when pasting files from a different profile. * them, which is essential when pasting files from a different profile.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment