diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-02 04:55:52 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-02 04:55:52 +0000 |
commit | 67241b83d4bd573d00f1fa6e6056cf25f74ddf49 (patch) | |
tree | 7613732325f898bcafbb7c9eac0f31e9ce9e5cd9 /chrome/browser/chromeos/drive/file_system_proxy.cc | |
parent | ce34e101af48b9b576b6cdee5fac7f88a956ec21 (diff) | |
download | chromium_src-67241b83d4bd573d00f1fa6e6056cf25f74ddf49.zip chromium_src-67241b83d4bd573d00f1fa6e6056cf25f74ddf49.tar.gz chromium_src-67241b83d4bd573d00f1fa6e6056cf25f74ddf49.tar.bz2 |
Rename drive::DriveEntryProto to drive::ResourceEntry
As part of an effort to remove 'drive' prefix from c/b/chromeos/drive.
BUG=233482
TEST=none
R=kinaba@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/14616011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/drive/file_system_proxy.cc')
-rw-r--r-- | chrome/browser/chromeos/drive/file_system_proxy.cc | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/chrome/browser/chromeos/drive/file_system_proxy.cc b/chrome/browser/chromeos/drive/file_system_proxy.cc index 6b609cf..1ca7e88 100644 --- a/chrome/browser/chromeos/drive/file_system_proxy.cc +++ b/chrome/browser/chromeos/drive/file_system_proxy.cc @@ -152,13 +152,14 @@ void DidCloseFileForTruncate( } // namespace -base::FileUtilProxy::Entry DriveEntryProtoToFileUtilProxyEntry( - const DriveEntryProto& proto) { +base::FileUtilProxy::Entry ResourceEntryToFileUtilProxyEntry( + const ResourceEntry& resource_entry) { base::PlatformFileInfo file_info; - util::ConvertProtoToPlatformFileInfo(proto.file_info(), &file_info); + util::ConvertResourceEntryToPlatformFileInfo( + resource_entry.file_info(), &file_info); base::FileUtilProxy::Entry entry; - entry.name = proto.base_name(); + entry.name = resource_entry.base_name(); entry.is_directory = file_info.is_directory; entry.size = file_info.size; entry.last_modified_time = file_info.last_modified; @@ -656,10 +657,10 @@ void FileSystemProxy::OnGetEntryInfoByPath( const base::FilePath& entry_path, const FileSystemOperation::SnapshotFileCallback& callback, FileError error, - scoped_ptr<DriveEntryProto> entry_proto) { + scoped_ptr<ResourceEntry> entry) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - if (error != FILE_ERROR_OK || !entry_proto.get()) { + if (error != FILE_ERROR_OK || !entry.get()) { callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, base::PlatformFileInfo(), base::FilePath(), @@ -668,7 +669,7 @@ void FileSystemProxy::OnGetEntryInfoByPath( } base::PlatformFileInfo file_info; - util::ConvertProtoToPlatformFileInfo(entry_proto->file_info(), &file_info); + util::ConvertResourceEntryToPlatformFileInfo(entry->file_info(), &file_info); CallFileSystemMethodOnUIThread( base::Bind(&FileSystemInterface::GetFileByPath, @@ -750,7 +751,7 @@ void FileSystemProxy::OnGetMetadata( const base::FilePath& file_path, const FileSystemOperation::GetMetadataCallback& callback, FileError error, - scoped_ptr<DriveEntryProto> entry_proto) { + scoped_ptr<ResourceEntry> entry) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (error != FILE_ERROR_OK) { @@ -759,10 +760,10 @@ void FileSystemProxy::OnGetMetadata( base::FilePath()); return; } - DCHECK(entry_proto.get()); + DCHECK(entry.get()); base::PlatformFileInfo file_info; - util::ConvertProtoToPlatformFileInfo(entry_proto->file_info(), &file_info); + util::ConvertResourceEntryToPlatformFileInfo(entry->file_info(), &file_info); callback.Run(base::PLATFORM_FILE_OK, file_info, file_path); } @@ -772,7 +773,7 @@ void FileSystemProxy::OnReadDirectory( callback, FileError error, bool hide_hosted_documents, - scoped_ptr<DriveEntryProtoVector> proto_entries) { + scoped_ptr<ResourceEntryVector> resource_entries) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (error != FILE_ERROR_OK) { @@ -781,18 +782,18 @@ void FileSystemProxy::OnReadDirectory( false); return; } - DCHECK(proto_entries.get()); + DCHECK(resource_entries.get()); std::vector<base::FileUtilProxy::Entry> entries; // Convert Drive files to something File API stack can understand. - for (size_t i = 0; i < proto_entries->size(); ++i) { - const DriveEntryProto& proto = (*proto_entries)[i]; - if (proto.has_file_specific_info() && - proto.file_specific_info().is_hosted_document() && + for (size_t i = 0; i < resource_entries->size(); ++i) { + const ResourceEntry& resource_entry = (*resource_entries)[i]; + if (resource_entry.has_file_specific_info() && + resource_entry.file_specific_info().is_hosted_document() && hide_hosted_documents) { continue; } - entries.push_back(DriveEntryProtoToFileUtilProxyEntry(proto)); + entries.push_back(ResourceEntryToFileUtilProxyEntry(resource_entry)); } callback.Run(base::PLATFORM_FILE_OK, entries, false); |