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

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

Issue 145303002: Convert Media Galleries to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
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_backend.h" 5 #include "chrome/browser/local_discovery/storage/privet_filesystem_backend.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/browser/local_discovery/storage/privet_filesystem_async_util.h" 9 #include "chrome/browser/local_discovery/storage/privet_filesystem_async_util.h"
10 #include "chrome/browser/local_discovery/storage/privet_filesystem_constants.h" 10 #include "chrome/browser/local_discovery/storage/privet_filesystem_constants.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 void PrivetFileSystemBackend::OpenFileSystem( 37 void PrivetFileSystemBackend::OpenFileSystem(
38 const GURL& origin_url, 38 const GURL& origin_url,
39 fileapi::FileSystemType type, 39 fileapi::FileSystemType type,
40 fileapi::OpenFileSystemMode mode, 40 fileapi::OpenFileSystemMode mode,
41 const OpenFileSystemCallback& callback) { 41 const OpenFileSystemCallback& callback) {
42 // Copied from src/chrome/browser/chromeos/fileapi/file_system_backend.cc 42 // Copied from src/chrome/browser/chromeos/fileapi/file_system_backend.cc
43 // This is deprecated for non-sandboxed filesystems. 43 // This is deprecated for non-sandboxed filesystems.
44 NOTREACHED(); 44 NOTREACHED();
45 callback.Run(GURL(), std::string(), base::PLATFORM_FILE_ERROR_SECURITY); 45 callback.Run(GURL(), std::string(), base::File::FILE_ERROR_SECURITY);
46 } 46 }
47 47
48 fileapi::FileSystemQuotaUtil* PrivetFileSystemBackend::GetQuotaUtil() { 48 fileapi::FileSystemQuotaUtil* PrivetFileSystemBackend::GetQuotaUtil() {
49 // No quota support. 49 // No quota support.
50 return NULL; 50 return NULL;
51 } 51 }
52 52
53 fileapi::AsyncFileUtil* PrivetFileSystemBackend::GetAsyncFileUtil( 53 fileapi::AsyncFileUtil* PrivetFileSystemBackend::GetAsyncFileUtil(
54 fileapi::FileSystemType type) { 54 fileapi::FileSystemType type) {
55 return async_util_.get(); 55 return async_util_.get();
56 } 56 }
57 57
58 fileapi::CopyOrMoveFileValidatorFactory* 58 fileapi::CopyOrMoveFileValidatorFactory*
59 PrivetFileSystemBackend::GetCopyOrMoveFileValidatorFactory( 59 PrivetFileSystemBackend::GetCopyOrMoveFileValidatorFactory(
60 fileapi::FileSystemType type, base::PlatformFileError* error_code) { 60 fileapi::FileSystemType type, base::File::Error* error_code) {
61 DCHECK(error_code); 61 DCHECK(error_code);
62 *error_code = base::PLATFORM_FILE_OK; 62 *error_code = base::File::FILE_OK;
63 return NULL; 63 return NULL;
64 } 64 }
65 65
66 fileapi::FileSystemOperation* 66 fileapi::FileSystemOperation*
67 PrivetFileSystemBackend::CreateFileSystemOperation( 67 PrivetFileSystemBackend::CreateFileSystemOperation(
68 const fileapi::FileSystemURL& url, 68 const fileapi::FileSystemURL& url,
69 fileapi::FileSystemContext* context, 69 fileapi::FileSystemContext* context,
70 base::PlatformFileError* error_code) const { 70 base::File::Error* error_code) const {
71 return fileapi::FileSystemOperation::Create( 71 return fileapi::FileSystemOperation::Create(
72 url, context, 72 url, context,
73 make_scoped_ptr(new fileapi::FileSystemOperationContext(context))); 73 make_scoped_ptr(new fileapi::FileSystemOperationContext(context)));
74 } 74 }
75 75
76 scoped_ptr<webkit_blob::FileStreamReader> 76 scoped_ptr<webkit_blob::FileStreamReader>
77 PrivetFileSystemBackend::CreateFileStreamReader( 77 PrivetFileSystemBackend::CreateFileStreamReader(
78 const fileapi::FileSystemURL& url, 78 const fileapi::FileSystemURL& url,
79 int64 offset, 79 int64 offset,
80 const base::Time& expected_modification_time, 80 const base::Time& expected_modification_time,
81 fileapi::FileSystemContext* context) const { 81 fileapi::FileSystemContext* context) const {
82 return scoped_ptr<webkit_blob::FileStreamReader>(); 82 return scoped_ptr<webkit_blob::FileStreamReader>();
83 } 83 }
84 84
85 scoped_ptr<fileapi::FileStreamWriter> 85 scoped_ptr<fileapi::FileStreamWriter>
86 PrivetFileSystemBackend::CreateFileStreamWriter( 86 PrivetFileSystemBackend::CreateFileStreamWriter(
87 const fileapi::FileSystemURL& url, 87 const fileapi::FileSystemURL& url,
88 int64 offset, 88 int64 offset,
89 fileapi::FileSystemContext* context) const { 89 fileapi::FileSystemContext* context) const {
90 return scoped_ptr<fileapi::FileStreamWriter>(); 90 return scoped_ptr<fileapi::FileStreamWriter>();
91 } 91 }
92 92
93 } // namespace local_discovery 93 } // namespace local_discovery
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698