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