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

Unified Diff: storage/browser/fileapi/file_system_operation_impl.cc

Issue 1455403003: Add an option to specify requested fields for fetching metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: storage/browser/fileapi/file_system_operation_impl.cc
diff --git a/storage/browser/fileapi/file_system_operation_impl.cc b/storage/browser/fileapi/file_system_operation_impl.cc
index 79cf89e23d93b0664717e2b943bc5765dd91f9ef..b6a699778b920517e50c5798602195e8f55a0d33 100644
--- a/storage/browser/fileapi/file_system_operation_impl.cc
+++ b/storage/browser/fileapi/file_system_operation_impl.cc
@@ -131,7 +131,7 @@ void FileSystemOperationImpl::DirectoryExists(const FileSystemURL& url,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationDirectoryExists));
async_file_util_->GetFileInfo(
- operation_context_.Pass(), url,
+ operation_context_.Pass(), url, GET_METADATA_FIELD_IS_DIRECTORY,
base::Bind(&FileSystemOperationImpl::DidDirectoryExists,
weak_factory_.GetWeakPtr(), callback));
}
@@ -140,15 +140,17 @@ void FileSystemOperationImpl::FileExists(const FileSystemURL& url,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationFileExists));
async_file_util_->GetFileInfo(
- operation_context_.Pass(), url,
+ operation_context_.Pass(), url, GET_METADATA_FIELD_IS_DIRECTORY,
base::Bind(&FileSystemOperationImpl::DidFileExists,
weak_factory_.GetWeakPtr(), callback));
}
-void FileSystemOperationImpl::GetMetadata(
- const FileSystemURL& url, const GetMetadataCallback& callback) {
+void FileSystemOperationImpl::GetMetadata(const FileSystemURL& url,
+ int fields,
+ const GetMetadataCallback& callback) {
DCHECK(SetPendingOperationType(kOperationGetMetadata));
- async_file_util_->GetFileInfo(operation_context_.Pass(), url, callback);
+ async_file_util_->GetFileInfo(operation_context_.Pass(), url, fields,
+ callback);
}
void FileSystemOperationImpl::ReadDirectory(
« no previous file with comments | « storage/browser/fileapi/file_system_operation_impl.h ('k') | storage/browser/fileapi/file_system_operation_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698