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

Side by Side Diff: chrome/browser/local_discovery/storage/privet_filesystem_async_util.cc

Issue 120533006: Stub for Privet file system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 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 "base/platform_file.h"
8 #include "webkit/browser/fileapi/file_system_url.h"
9 #include "webkit/common/blob/shareable_file_reference.h"
10
11 namespace local_discovery {
12
13 void PrivetFileSystemAsyncUtil::CreateOrOpen(
14 scoped_ptr<fileapi::FileSystemOperationContext> context,
15 const fileapi::FileSystemURL& url,
16 int file_flags,
17 const CreateOrOpenCallback& callback) {
18 NOTIMPLEMENTED();
19 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION,
20 base::PassPlatformFile(NULL),
21 base::Closure());
22 }
23
24 void PrivetFileSystemAsyncUtil::EnsureFileExists(
25 scoped_ptr<fileapi::FileSystemOperationContext> context,
26 const fileapi::FileSystemURL& url,
27 const EnsureFileExistsCallback& callback) {
28 NOTIMPLEMENTED();
29 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION,
30 false);
31 }
32
33 void PrivetFileSystemAsyncUtil::CreateDirectory(
34 scoped_ptr<fileapi::FileSystemOperationContext> context,
35 const fileapi::FileSystemURL& url,
36 bool exclusive,
37 bool recursive,
38 const StatusCallback& callback) {
39 NOTIMPLEMENTED();
40 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
41 }
42
43 void PrivetFileSystemAsyncUtil::GetFileInfo(
44 scoped_ptr<fileapi::FileSystemOperationContext> context,
45 const fileapi::FileSystemURL& url,
46 const GetFileInfoCallback& callback) {
47 base::PlatformFileInfo file_info;
48
49 if (url.path() == base::FilePath(FILE_PATH_LITERAL("/privet"))) {
50 file_info.size = 20;
51 file_info.is_directory = true;
52 file_info.is_symbolic_link = false;
53 } else {
54 file_info.size = 3000;
55 file_info.is_directory = false;
56 file_info.is_symbolic_link = false;
57 }
58 callback.Run(base::PLATFORM_FILE_OK,
59 file_info);
60 }
61
62 void PrivetFileSystemAsyncUtil::ReadDirectory(
63 scoped_ptr<fileapi::FileSystemOperationContext> context,
64 const fileapi::FileSystemURL& url,
65 const ReadDirectoryCallback& callback) {
66 EntryList entry_list;
67
68 fileapi::DirectoryEntry entry("Random file",
69 fileapi::DirectoryEntry::FILE,
70 3000,
71 base::Time());
72 entry_list.push_back(entry);
73
74 callback.Run(base::PLATFORM_FILE_OK, entry_list, false);
75 }
76
77 void PrivetFileSystemAsyncUtil::Touch(
78 scoped_ptr<fileapi::FileSystemOperationContext> context,
79 const fileapi::FileSystemURL& url,
80 const base::Time& last_access_time,
81 const base::Time& last_modified_time,
82 const StatusCallback& callback) {
83 NOTIMPLEMENTED();
84 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
85 }
86
87 void PrivetFileSystemAsyncUtil::Truncate(
88 scoped_ptr<fileapi::FileSystemOperationContext> context,
89 const fileapi::FileSystemURL& url,
90 int64 length,
91 const StatusCallback& callback) {
92 NOTIMPLEMENTED();
93 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
94 }
95
96 void PrivetFileSystemAsyncUtil::CopyFileLocal(
97 scoped_ptr<fileapi::FileSystemOperationContext> context,
98 const fileapi::FileSystemURL& src_url,
99 const fileapi::FileSystemURL& dest_url,
100 CopyOrMoveOption option,
101 const CopyFileProgressCallback& progress_callback,
102 const StatusCallback& callback) {
103 NOTIMPLEMENTED();
104 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
105 }
106
107 void PrivetFileSystemAsyncUtil::MoveFileLocal(
108 scoped_ptr<fileapi::FileSystemOperationContext> context,
109 const fileapi::FileSystemURL& src_url,
110 const fileapi::FileSystemURL& dest_url,
111 CopyOrMoveOption option,
112 const StatusCallback& callback) {
113 NOTIMPLEMENTED();
114 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
115 }
116
117 void PrivetFileSystemAsyncUtil::CopyInForeignFile(
118 scoped_ptr<fileapi::FileSystemOperationContext> context,
119 const base::FilePath& src_file_path,
120 const fileapi::FileSystemURL& dest_url,
121 const StatusCallback& callback) {
122 NOTIMPLEMENTED();
123 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
124 }
125
126 void PrivetFileSystemAsyncUtil::DeleteFile(
127 scoped_ptr<fileapi::FileSystemOperationContext> context,
128 const fileapi::FileSystemURL& url,
129 const StatusCallback& callback) {
130 NOTIMPLEMENTED();
131 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
132 }
133
134 void PrivetFileSystemAsyncUtil::DeleteDirectory(
135 scoped_ptr<fileapi::FileSystemOperationContext> context,
136 const fileapi::FileSystemURL& url,
137 const StatusCallback& callback) {
138 NOTIMPLEMENTED();
139 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
140 }
141
142 void PrivetFileSystemAsyncUtil::DeleteRecursively(
143 scoped_ptr<fileapi::FileSystemOperationContext> context,
144 const fileapi::FileSystemURL& url,
145 const StatusCallback& callback) {
146 NOTIMPLEMENTED();
147 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION);
148 }
149
150 void PrivetFileSystemAsyncUtil::CreateSnapshotFile(
151 scoped_ptr<fileapi::FileSystemOperationContext> context,
152 const fileapi::FileSystemURL& url,
153 const CreateSnapshotFileCallback& callback) {
154 NOTIMPLEMENTED();
155 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION,
156 base::PlatformFileInfo(),
157 base::FilePath(),
158 scoped_refptr<webkit_blob::ShareableFileReference>());
159 }
160
161 } // namespace local_discovery
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698