Chromium Code Reviews| Index: chrome/browser/local_discovery/storage/privet_filesystem_async_util.cc |
| diff --git a/chrome/browser/local_discovery/storage/privet_filesystem_async_util.cc b/chrome/browser/local_discovery/storage/privet_filesystem_async_util.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..86e4b9428bd5c1fdb5c11379d2110e1451032e12 |
| --- /dev/null |
| +++ b/chrome/browser/local_discovery/storage/privet_filesystem_async_util.cc |
| @@ -0,0 +1,132 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/local_discovery/storage/privet_filesystem_async_util.h" |
| + |
| +#include "webkit/browser/fileapi/file_system_url.h" |
| + |
| +namespace local_discovery { |
| + |
| +void PrivetFileSystemAsyncUtil::CreateOrOpen( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& url, |
| + int file_flags, |
| + const CreateOrOpenCallback& callback) { |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::EnsureFileExists( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& url, |
| + const EnsureFileExistsCallback& callback) { |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::CreateDirectory( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& url, |
| + bool exclusive, |
| + bool recursive, |
| + const StatusCallback& callback) { |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::GetFileInfo( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& url, |
| + const GetFileInfoCallback& callback) { |
| + base::PlatformFileInfo file_info; |
| + |
| + if (url.path() == base::FilePath(FILE_PATH_LITERAL("/privet"))) { |
| + file_info.size = 20; |
|
Vitaly Buka (NO REVIEWS)
2014/01/07 21:08:49
missaligned
Noam Samuel
2014/01/07 22:10:59
Done.
|
| + file_info.is_directory = true; |
| + file_info.is_symbolic_link = false; |
| + } else { |
| + file_info.size = 3000; |
| + file_info.is_directory = false; |
| + file_info.is_symbolic_link = false; |
| + } |
| + callback.Run(base::PLATFORM_FILE_OK, |
| + file_info); |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::ReadDirectory( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& url, |
| + const ReadDirectoryCallback& callback) { |
| + EntryList entry_list; |
| + |
| + fileapi::DirectoryEntry entry("Random file", |
| + fileapi::DirectoryEntry::FILE, |
| + 3000, |
| + base::Time()); |
| + entry_list.push_back(entry); |
| + |
| + callback.Run(base::PLATFORM_FILE_OK, |
|
Vitaly Buka (NO REVIEWS)
2014/01/07 21:08:49
should be one line
Noam Samuel
2014/01/07 22:10:59
Done.
|
| + entry_list, |
| + false); |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::Touch( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& url, |
| + const base::Time& last_access_time, |
| + const base::Time& last_modified_time, |
| + const StatusCallback& callback) { |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::Truncate( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& url, |
| + int64 length, |
| + const StatusCallback& callback) { |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::CopyFileLocal( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& src_url, |
| + const fileapi::FileSystemURL& dest_url, |
| + CopyOrMoveOption option, |
| + const CopyFileProgressCallback& progress_callback, |
| + const StatusCallback& callback) { |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::MoveFileLocal( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& src_url, |
| + const fileapi::FileSystemURL& dest_url, |
| + CopyOrMoveOption option, |
| + const StatusCallback& callback) { |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::CopyInForeignFile( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const base::FilePath& src_file_path, |
| + const fileapi::FileSystemURL& dest_url, |
| + const StatusCallback& callback) { |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::DeleteFile( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& url, |
| + const StatusCallback& callback) { |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::DeleteDirectory( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& url, |
| + const StatusCallback& callback) { |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::DeleteRecursively( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& url, |
| + const StatusCallback& callback) { |
| +} |
| + |
| +void PrivetFileSystemAsyncUtil::CreateSnapshotFile( |
| + scoped_ptr<fileapi::FileSystemOperationContext> context, |
| + const fileapi::FileSystemURL& url, |
| + const CreateSnapshotFileCallback& callback) { |
| +} |
| + |
| + |
| +} // namespace local_discovery |