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

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

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build Created 6 years, 4 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 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_BACKEND_H_ 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_BACKEND_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_BACKEND_H_ 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_BACKEND_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "content/public/browser/browser_context.h" 12 #include "content/public/browser/browser_context.h"
13 #include "webkit/browser/blob/file_stream_reader.h" 13 #include "webkit/browser/blob/file_stream_reader.h"
14 #include "webkit/browser/fileapi/external_mount_points.h" 14 #include "webkit/browser/fileapi/external_mount_points.h"
15 #include "webkit/browser/fileapi/file_stream_writer.h" 15 #include "webkit/browser/fileapi/file_stream_writer.h"
16 #include "webkit/browser/fileapi/file_system_backend.h" 16 #include "webkit/browser/fileapi/file_system_backend.h"
17 17
18 namespace local_discovery { 18 namespace local_discovery {
19 19
20 class PrivetFileSystemAsyncUtil; 20 class PrivetFileSystemAsyncUtil;
21 21
22 class PrivetFileSystemBackend : public fileapi::FileSystemBackend { 22 class PrivetFileSystemBackend : public storage::FileSystemBackend {
23 public: 23 public:
24 PrivetFileSystemBackend(fileapi::ExternalMountPoints* mount_points, 24 PrivetFileSystemBackend(storage::ExternalMountPoints* mount_points,
25 content::BrowserContext* browser_context); 25 content::BrowserContext* browser_context);
26 virtual ~PrivetFileSystemBackend(); 26 virtual ~PrivetFileSystemBackend();
27 27
28 // FileSystemBackend implementation. 28 // FileSystemBackend implementation.
29 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE; 29 virtual bool CanHandleType(storage::FileSystemType type) const OVERRIDE;
30 virtual void Initialize(fileapi::FileSystemContext* context) OVERRIDE; 30 virtual void Initialize(storage::FileSystemContext* context) OVERRIDE;
31 31
32 virtual void ResolveURL(const fileapi::FileSystemURL& url, 32 virtual void ResolveURL(const storage::FileSystemURL& url,
33 fileapi::OpenFileSystemMode mode, 33 storage::OpenFileSystemMode mode,
34 const OpenFileSystemCallback& callback) OVERRIDE; 34 const OpenFileSystemCallback& callback) OVERRIDE;
35 35
36 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil( 36 virtual storage::AsyncFileUtil* GetAsyncFileUtil(
37 fileapi::FileSystemType type) OVERRIDE; 37 storage::FileSystemType type) OVERRIDE;
38 virtual fileapi::CopyOrMoveFileValidatorFactory* 38 virtual storage::CopyOrMoveFileValidatorFactory*
39 GetCopyOrMoveFileValidatorFactory( 39 GetCopyOrMoveFileValidatorFactory(storage::FileSystemType type,
40 fileapi::FileSystemType type, 40 base::File::Error* error_code) OVERRIDE;
41 base::File::Error* error_code) OVERRIDE;
42 41
43 virtual fileapi::FileSystemOperation* CreateFileSystemOperation( 42 virtual storage::FileSystemOperation* CreateFileSystemOperation(
44 const fileapi::FileSystemURL& url, 43 const storage::FileSystemURL& url,
45 fileapi::FileSystemContext* context, 44 storage::FileSystemContext* context,
46 base::File::Error* error_code) const OVERRIDE; 45 base::File::Error* error_code) const OVERRIDE;
47 46
48 virtual bool SupportsStreaming( 47 virtual bool SupportsStreaming(
49 const fileapi::FileSystemURL& url) const OVERRIDE; 48 const storage::FileSystemURL& url) const OVERRIDE;
50 49
51 virtual bool HasInplaceCopyImplementation( 50 virtual bool HasInplaceCopyImplementation(
52 fileapi::FileSystemType type) const OVERRIDE; 51 storage::FileSystemType type) const OVERRIDE;
53 52
54 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( 53 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
55 const fileapi::FileSystemURL& url, 54 const storage::FileSystemURL& url,
56 int64 offset, 55 int64 offset,
57 const base::Time& expected_modification_time, 56 const base::Time& expected_modification_time,
58 fileapi::FileSystemContext* context) const OVERRIDE; 57 storage::FileSystemContext* context) const OVERRIDE;
59 58
60 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter( 59 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter(
61 const fileapi::FileSystemURL& url, 60 const storage::FileSystemURL& url,
62 int64 offset, 61 int64 offset,
63 fileapi::FileSystemContext* context) const OVERRIDE; 62 storage::FileSystemContext* context) const OVERRIDE;
64 63
65 virtual fileapi::FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; 64 virtual storage::FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE;
66 65
67 private: 66 private:
68 // User mount points. 67 // User mount points.
69 scoped_refptr<fileapi::ExternalMountPoints> mount_points_; 68 scoped_refptr<storage::ExternalMountPoints> mount_points_;
70 scoped_ptr<PrivetFileSystemAsyncUtil> async_util_; 69 scoped_ptr<PrivetFileSystemAsyncUtil> async_util_;
71 }; 70 };
72 71
73 } // namespace local_discovery 72 } // namespace local_discovery
74 73
75 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_BACKEND_H_ 74 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698