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

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

Issue 278113002: Remove PlatformFile from fileapi::AsyncFileUtil (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/local_discovery/storage/privet_filesystem_async_util.h" 5 #include "chrome/browser/local_discovery/storage/privet_filesystem_async_util.h"
6 6
7 #include "base/platform_file.h"
8 #include "chrome/browser/local_discovery/storage/path_util.h" 7 #include "chrome/browser/local_discovery/storage/path_util.h"
9 #include "webkit/browser/fileapi/file_system_url.h" 8 #include "webkit/browser/fileapi/file_system_url.h"
10 #include "webkit/common/blob/shareable_file_reference.h" 9 #include "webkit/common/blob/shareable_file_reference.h"
11 10
12 namespace local_discovery { 11 namespace local_discovery {
13 12
14 PrivetFileSystemAsyncUtil::PrivetFileSystemAsyncUtil( 13 PrivetFileSystemAsyncUtil::PrivetFileSystemAsyncUtil(
15 content::BrowserContext* browser_context) { 14 content::BrowserContext* browser_context) {
16 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 15 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
17 operation_factory_ = new PrivetFileSystemOperationFactory(browser_context); 16 operation_factory_ = new PrivetFileSystemOperationFactory(browser_context);
18 } 17 }
19 18
20 PrivetFileSystemAsyncUtil::~PrivetFileSystemAsyncUtil() { 19 PrivetFileSystemAsyncUtil::~PrivetFileSystemAsyncUtil() {
21 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 20 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
22 content::BrowserThread::DeleteSoon( 21 content::BrowserThread::DeleteSoon(
23 content::BrowserThread::UI, FROM_HERE, operation_factory_); 22 content::BrowserThread::UI, FROM_HERE, operation_factory_);
24 } 23 }
25 24
26 void PrivetFileSystemAsyncUtil::CreateOrOpen( 25 void PrivetFileSystemAsyncUtil::CreateOrOpen(
27 scoped_ptr<fileapi::FileSystemOperationContext> context, 26 scoped_ptr<fileapi::FileSystemOperationContext> context,
28 const fileapi::FileSystemURL& url, 27 const fileapi::FileSystemURL& url,
29 int file_flags, 28 int file_flags,
30 const CreateOrOpenCallback& callback) { 29 const CreateOrOpenCallback& callback) {
31 NOTIMPLEMENTED(); 30 NOTIMPLEMENTED();
32 callback.Run(base::File::FILE_ERROR_INVALID_OPERATION, 31 callback.Run(base::File(base::File::FILE_ERROR_INVALID_OPERATION),
33 base::PassPlatformFile(NULL),
34 base::Closure()); 32 base::Closure());
35 } 33 }
36 34
37 void PrivetFileSystemAsyncUtil::EnsureFileExists( 35 void PrivetFileSystemAsyncUtil::EnsureFileExists(
38 scoped_ptr<fileapi::FileSystemOperationContext> context, 36 scoped_ptr<fileapi::FileSystemOperationContext> context,
39 const fileapi::FileSystemURL& url, 37 const fileapi::FileSystemURL& url,
40 const EnsureFileExistsCallback& callback) { 38 const EnsureFileExistsCallback& callback) {
41 NOTIMPLEMENTED(); 39 NOTIMPLEMENTED();
42 callback.Run(base::File::FILE_ERROR_INVALID_OPERATION, false); 40 callback.Run(base::File::FILE_ERROR_INVALID_OPERATION, false);
43 } 41 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 const fileapi::FileSystemURL& url, 165 const fileapi::FileSystemURL& url,
168 const CreateSnapshotFileCallback& callback) { 166 const CreateSnapshotFileCallback& callback) {
169 NOTIMPLEMENTED(); 167 NOTIMPLEMENTED();
170 callback.Run(base::File::FILE_ERROR_INVALID_OPERATION, 168 callback.Run(base::File::FILE_ERROR_INVALID_OPERATION,
171 base::File::Info(), 169 base::File::Info(),
172 base::FilePath(), 170 base::FilePath(),
173 scoped_refptr<webkit_blob::ShareableFileReference>()); 171 scoped_refptr<webkit_blob::ShareableFileReference>());
174 } 172 }
175 173
176 } // namespace local_discovery 174 } // namespace local_discovery
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698