Commit 4e8780a2 authored by Sam McNally's avatar Sam McNally Committed by Commit Bot

Remove want_thumbnail from DriveFs::GetMetadata().

Bug: 883230
Change-Id: Iab1c421c8a4325c628f915d35b280dc3c8be8a69
Reviewed-on: https://chromium-review.googlesource.com/1240054Reviewed-by: default avatarSergei Datsenko <dats@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594578}
parent b5fa59f7
......@@ -623,12 +623,11 @@ class SingleEntryPropertiesGetterForDriveFs {
}
drivefs_interface->GetMetadata(
path, /* want_thumbnail = */ false,
mojo::WrapCallbackWithDefaultInvokeIfNotRun(
base::BindOnce(
&SingleEntryPropertiesGetterForDriveFs::OnGetFileInfo,
weak_ptr_factory_.GetWeakPtr()),
drive::FILE_ERROR_SERVICE_UNAVAILABLE, nullptr));
path, mojo::WrapCallbackWithDefaultInvokeIfNotRun(
base::BindOnce(
&SingleEntryPropertiesGetterForDriveFs::OnGetFileInfo,
weak_ptr_factory_.GetWeakPtr()),
drive::FILE_ERROR_SERVICE_UNAVAILABLE, nullptr));
}
void OnGetFileInfo(drive::FileError error,
......@@ -1621,7 +1620,7 @@ bool FileManagerPrivateInternalGetDownloadUrlFunction::RunAsyncForDriveFs(
return false;
drivefs_interface->GetMetadata(
path, false,
path,
mojo::WrapCallbackWithDefaultInvokeIfNotRun(
base::BindOnce(
&FileManagerPrivateInternalGetDownloadUrlFunction::OnGotMetadata,
......
......@@ -193,8 +193,7 @@ bool OpenFileWithBrowser(Profile* profile,
integration_service->GetDriveFsInterface() &&
integration_service->GetRelativeDrivePath(file_path, &path)) {
integration_service->GetDriveFsInterface()->GetMetadata(
path, false,
base::BindOnce(&OpenHostedDriveFsFile, file_path, profile));
path, base::BindOnce(&OpenHostedDriveFsFile, file_path, profile));
return true;
}
OpenGDocUrlFromFile(file_path, profile);
......
......@@ -145,7 +145,7 @@ class FakeDriveFs::SearchQuery : public mojom::SearchQuery {
pending_callbacks_ = results_.size() + 1;
for (size_t i = 0; i < results_.size(); ++i) {
drive_fs_->GetMetadata(
results_[i]->path, false,
results_[i]->path,
base::BindOnce(&SearchQuery::OnMetadata,
weak_ptr_factory_.GetWeakPtr(), i));
}
......@@ -265,7 +265,6 @@ void FakeDriveFs::Init(drivefs::mojom::DriveFsConfigurationPtr config,
}
void FakeDriveFs::GetMetadata(const base::FilePath& path,
bool want_thumbnail,
GetMetadataCallback callback) {
base::FilePath absolute_path = mount_path_;
CHECK(base::FilePath("/").AppendRelativePath(path, &absolute_path));
......
......@@ -49,7 +49,6 @@ class FakeDriveFs : public drivefs::mojom::DriveFs,
// drivefs::mojom::DriveFs:
void GetMetadata(const base::FilePath& path,
bool want_thumbnail,
GetMetadataCallback callback) override;
void SetPinned(const base::FilePath& path,
......
......@@ -20,11 +20,8 @@ interface DriveFsBootstrap {
// Implemented by DriveFS, used from Chrome.
interface DriveFs {
// Returns the metadata for |path|. Thumbnail requests may require requesting
// a thumbnail from the server so thumbnails are only populated for requests
// where |want_thumbnail| is true.
GetMetadata(mojo_base.mojom.FilePath path,
[MinVersion=1] bool want_thumbnail) => (
// Returns the metadata for |path|.
GetMetadata(mojo_base.mojom.FilePath path) => (
FileError error, FileMetadata? metadata);
// Sets the file at |path| to pinned or unpinned depending on the value of
......@@ -172,9 +169,8 @@ struct FileMetadata {
// May be present if the file is an image.
ImageMetadata? image_metadata;
// The thumbnail as a PNG. It is only set if |want_thumbnail| is true in the
// request and the file has a thumbnail available.
array<uint8>? thumbnail;
// Never set.
array<uint8>? deprecated_thumbnail;
Capabilities capabilities;
};
......
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