Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/local_discovery/storage/privet_filesystem_async_util.h" | |
| 6 | |
| 7 #include "webkit/browser/fileapi/file_system_url.h" | |
| 8 | |
| 9 namespace local_discovery { | |
| 10 | |
| 11 void PrivetFileSystemAsyncUtil::CreateOrOpen( | |
| 12 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 13 const fileapi::FileSystemURL& url, | |
| 14 int file_flags, | |
| 15 const CreateOrOpenCallback& callback) { | |
| 16 } | |
| 17 | |
| 18 void PrivetFileSystemAsyncUtil::EnsureFileExists( | |
| 19 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 20 const fileapi::FileSystemURL& url, | |
| 21 const EnsureFileExistsCallback& callback) { | |
| 22 } | |
| 23 | |
| 24 void PrivetFileSystemAsyncUtil::CreateDirectory( | |
| 25 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 26 const fileapi::FileSystemURL& url, | |
| 27 bool exclusive, | |
| 28 bool recursive, | |
| 29 const StatusCallback& callback) { | |
| 30 } | |
| 31 | |
| 32 void PrivetFileSystemAsyncUtil::GetFileInfo( | |
| 33 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 34 const fileapi::FileSystemURL& url, | |
| 35 const GetFileInfoCallback& callback) { | |
| 36 base::PlatformFileInfo file_info; | |
| 37 | |
| 38 if (url.path() == base::FilePath(FILE_PATH_LITERAL("/privet"))) { | |
| 39 file_info.size = 20; | |
|
Vitaly Buka (NO REVIEWS)
2014/01/07 21:08:49
missaligned
Noam Samuel
2014/01/07 22:10:59
Done.
| |
| 40 file_info.is_directory = true; | |
| 41 file_info.is_symbolic_link = false; | |
| 42 } else { | |
| 43 file_info.size = 3000; | |
| 44 file_info.is_directory = false; | |
| 45 file_info.is_symbolic_link = false; | |
| 46 } | |
| 47 callback.Run(base::PLATFORM_FILE_OK, | |
| 48 file_info); | |
| 49 } | |
| 50 | |
| 51 void PrivetFileSystemAsyncUtil::ReadDirectory( | |
| 52 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 53 const fileapi::FileSystemURL& url, | |
| 54 const ReadDirectoryCallback& callback) { | |
| 55 EntryList entry_list; | |
| 56 | |
| 57 fileapi::DirectoryEntry entry("Random file", | |
| 58 fileapi::DirectoryEntry::FILE, | |
| 59 3000, | |
| 60 base::Time()); | |
| 61 entry_list.push_back(entry); | |
| 62 | |
| 63 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.
| |
| 64 entry_list, | |
| 65 false); | |
| 66 } | |
| 67 | |
| 68 void PrivetFileSystemAsyncUtil::Touch( | |
| 69 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 70 const fileapi::FileSystemURL& url, | |
| 71 const base::Time& last_access_time, | |
| 72 const base::Time& last_modified_time, | |
| 73 const StatusCallback& callback) { | |
| 74 } | |
| 75 | |
| 76 void PrivetFileSystemAsyncUtil::Truncate( | |
| 77 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 78 const fileapi::FileSystemURL& url, | |
| 79 int64 length, | |
| 80 const StatusCallback& callback) { | |
| 81 } | |
| 82 | |
| 83 void PrivetFileSystemAsyncUtil::CopyFileLocal( | |
| 84 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 85 const fileapi::FileSystemURL& src_url, | |
| 86 const fileapi::FileSystemURL& dest_url, | |
| 87 CopyOrMoveOption option, | |
| 88 const CopyFileProgressCallback& progress_callback, | |
| 89 const StatusCallback& callback) { | |
| 90 } | |
| 91 | |
| 92 void PrivetFileSystemAsyncUtil::MoveFileLocal( | |
| 93 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 94 const fileapi::FileSystemURL& src_url, | |
| 95 const fileapi::FileSystemURL& dest_url, | |
| 96 CopyOrMoveOption option, | |
| 97 const StatusCallback& callback) { | |
| 98 } | |
| 99 | |
| 100 void PrivetFileSystemAsyncUtil::CopyInForeignFile( | |
| 101 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 102 const base::FilePath& src_file_path, | |
| 103 const fileapi::FileSystemURL& dest_url, | |
| 104 const StatusCallback& callback) { | |
| 105 } | |
| 106 | |
| 107 void PrivetFileSystemAsyncUtil::DeleteFile( | |
| 108 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 109 const fileapi::FileSystemURL& url, | |
| 110 const StatusCallback& callback) { | |
| 111 } | |
| 112 | |
| 113 void PrivetFileSystemAsyncUtil::DeleteDirectory( | |
| 114 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 115 const fileapi::FileSystemURL& url, | |
| 116 const StatusCallback& callback) { | |
| 117 } | |
| 118 | |
| 119 void PrivetFileSystemAsyncUtil::DeleteRecursively( | |
| 120 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 121 const fileapi::FileSystemURL& url, | |
| 122 const StatusCallback& callback) { | |
| 123 } | |
| 124 | |
| 125 void PrivetFileSystemAsyncUtil::CreateSnapshotFile( | |
| 126 scoped_ptr<fileapi::FileSystemOperationContext> context, | |
| 127 const fileapi::FileSystemURL& url, | |
| 128 const CreateSnapshotFileCallback& callback) { | |
| 129 } | |
| 130 | |
| 131 | |
| 132 } // namespace local_discovery | |
| OLD | NEW |