OLD | NEW |
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 "webkit/browser/blob/file_stream_reader.h" | 13 #include "webkit/browser/blob/file_stream_reader.h" |
13 #include "webkit/browser/fileapi/external_mount_points.h" | 14 #include "webkit/browser/fileapi/external_mount_points.h" |
14 #include "webkit/browser/fileapi/file_stream_writer.h" | 15 #include "webkit/browser/fileapi/file_stream_writer.h" |
15 #include "webkit/browser/fileapi/file_system_backend.h" | 16 #include "webkit/browser/fileapi/file_system_backend.h" |
16 | 17 |
17 namespace local_discovery { | 18 namespace local_discovery { |
18 | 19 |
19 class PrivetFileSystemAsyncUtil; | 20 class PrivetFileSystemAsyncUtil; |
20 | 21 |
21 class PrivetFileSystemBackend : public fileapi::FileSystemBackend { | 22 class PrivetFileSystemBackend : public fileapi::FileSystemBackend { |
22 public: | 23 public: |
23 explicit PrivetFileSystemBackend(fileapi::ExternalMountPoints* mount_points); | 24 PrivetFileSystemBackend(fileapi::ExternalMountPoints* mount_points, |
| 25 content::BrowserContext* browser_context); |
24 virtual ~PrivetFileSystemBackend(); | 26 virtual ~PrivetFileSystemBackend(); |
25 | 27 |
26 // FileSystemBackend implementation. | 28 // FileSystemBackend implementation. |
27 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE; | 29 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE; |
28 virtual void Initialize(fileapi::FileSystemContext* context) OVERRIDE; | 30 virtual void Initialize(fileapi::FileSystemContext* context) OVERRIDE; |
29 | 31 |
30 virtual void OpenFileSystem( | 32 virtual void OpenFileSystem( |
31 const GURL& origin_url, | 33 const GURL& origin_url, |
32 fileapi::FileSystemType type, | 34 fileapi::FileSystemType type, |
33 fileapi::OpenFileSystemMode mode, | 35 fileapi::OpenFileSystemMode mode, |
(...skipping 26 matching lines...) Expand all Loading... |
60 | 62 |
61 private: | 63 private: |
62 // User mount points. | 64 // User mount points. |
63 scoped_refptr<fileapi::ExternalMountPoints> mount_points_; | 65 scoped_refptr<fileapi::ExternalMountPoints> mount_points_; |
64 scoped_ptr<PrivetFileSystemAsyncUtil> async_util_; | 66 scoped_ptr<PrivetFileSystemAsyncUtil> async_util_; |
65 }; | 67 }; |
66 | 68 |
67 } // namespace local_discovery | 69 } // namespace local_discovery |
68 | 70 |
69 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_BACKEND_H_ | 71 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_BACKEND_H_ |
OLD | NEW |