#include "chrome/browser/chromeos/drive/file_system_util.h"
#include "chrome/browser/chromeos/drive/resource_entry_conversion.h"
#include "content/public/browser/browser_thread.h"
-#include "webkit/browser/fileapi/file_system_url.h"
-#include "webkit/common/fileapi/directory_entry.h"
+#include "storage/browser/fileapi/file_system_url.h"
+#include "storage/common/fileapi/directory_entry.h"
using content::BrowserThread;
scoped_ptr<ResourceEntryVector> resource_entries) {
DCHECK(resource_entries);
- std::vector<fileapi::DirectoryEntry> entries;
+ std::vector<storage::DirectoryEntry> entries;
// Convert drive files to File API's directory entry.
entries.reserve(resource_entries->size());
for (size_t i = 0; i < resource_entries->size(); ++i) {
const ResourceEntry& resource_entry = (*resource_entries)[i];
- fileapi::DirectoryEntry entry;
+ storage::DirectoryEntry entry;
entry.name = resource_entry.base_name();
const PlatformFileInfoProto& file_info = resource_entry.file_info();
void RunReadDirectoryCallbackOnCompletion(const ReadDirectoryCallback& callback,
FileError error) {
callback.Run(FileErrorToBaseFileError(error),
- std::vector<fileapi::DirectoryEntry>(), false /*has_more*/);
+ std::vector<storage::DirectoryEntry>(),
+ false /*has_more*/);
}
// Runs |callback| with arguments based on |error|, |local_path| and |entry|.
const base::FilePath& local_path,
scoped_ptr<ResourceEntry> entry) {
if (error != FILE_ERROR_OK) {
- callback.Run(
- FileErrorToBaseFileError(error),
- base::File::Info(), base::FilePath(),
- webkit_blob::ScopedFile::ScopeOutPolicy());
+ callback.Run(FileErrorToBaseFileError(error),
+ base::File::Info(),
+ base::FilePath(),
+ storage::ScopedFile::ScopeOutPolicy());
return;
}
// If the file is a hosted document, a temporary JSON file is created to
// represent the document. The JSON file is not cached and its lifetime
// is managed by ShareableFileReference.
- webkit_blob::ScopedFile::ScopeOutPolicy scope_out_policy =
- entry->file_specific_info().is_hosted_document() ?
- webkit_blob::ScopedFile::DELETE_ON_SCOPE_OUT :
- webkit_blob::ScopedFile::DONT_DELETE_ON_SCOPE_OUT;
+ storage::ScopedFile::ScopeOutPolicy scope_out_policy =
+ entry->file_specific_info().is_hosted_document()
+ ? storage::ScopedFile::DELETE_ON_SCOPE_OUT
+ : storage::ScopedFile::DONT_DELETE_ON_SCOPE_OUT;
callback.Run(base::File::FILE_OK, file_info, local_path, scope_out_policy);
}
} // namespace
-FileSystemInterface* GetFileSystemFromUrl(const fileapi::FileSystemURL& url) {
+FileSystemInterface* GetFileSystemFromUrl(const storage::FileSystemURL& url) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
Profile* profile = util::ExtractProfileFromPath(url.path());