OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Supports FileIOs direct access on the host side. | 61 // Supports FileIOs direct access on the host side. |
62 // Non-NULL only for PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY}. | 62 // Non-NULL only for PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY}. |
63 fileapi::FileSystemOperationRunner* GetFileSystemOperationRunner() const { | 63 fileapi::FileSystemOperationRunner* GetFileSystemOperationRunner() const { |
64 return file_system_operation_runner_.get(); | 64 return file_system_operation_runner_.get(); |
65 } | 65 } |
66 bool ChecksQuota() const { return quota_reservation_ != NULL; } | 66 bool ChecksQuota() const { return quota_reservation_ != NULL; } |
67 // Opens a file for writing with quota checks. Returns the file size in the | 67 // Opens a file for writing with quota checks. Returns the file size in the |
68 // callback. | 68 // callback. |
69 typedef base::Callback<void(int64_t)> OpenQuotaFileCallback; | 69 typedef base::Callback<void(int64_t)> OpenQuotaFileCallback; |
70 void OpenQuotaFile(PepperFileIOHost* file_io_host, | 70 void OpenQuotaFile(PepperFileIOHost* file_io_host, |
71 const base::FilePath& file_path, | 71 const fileapi::FileSystemURL& url, |
72 const OpenQuotaFileCallback& callback); | 72 const OpenQuotaFileCallback& callback); |
73 // Closes the file. This must be called after OpenQuotaFile and before the | 73 // Closes the file. This must be called after OpenQuotaFile and before the |
74 // PepperFileIOHost is destroyed. | 74 // PepperFileIOHost is destroyed. |
75 void CloseQuotaFile(PepperFileIOHost* file_io_host, | 75 void CloseQuotaFile(PepperFileIOHost* file_io_host, |
76 int64_t max_written_offset); | 76 int64_t max_written_offset); |
77 | 77 |
78 private: | 78 private: |
79 friend class PepperFileSystemBrowserHostTest; | 79 friend class PepperFileSystemBrowserHostTest; |
80 | 80 |
81 void OpenExistingFileSystem( | 81 void OpenExistingFileSystem( |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 std::string fsid_; // used only for isolated filesystems. | 171 std::string fsid_; // used only for isolated filesystems. |
172 | 172 |
173 base::WeakPtrFactory<PepperFileSystemBrowserHost> weak_factory_; | 173 base::WeakPtrFactory<PepperFileSystemBrowserHost> weak_factory_; |
174 | 174 |
175 DISALLOW_COPY_AND_ASSIGN(PepperFileSystemBrowserHost); | 175 DISALLOW_COPY_AND_ASSIGN(PepperFileSystemBrowserHost); |
176 }; | 176 }; |
177 | 177 |
178 } // namespace content | 178 } // namespace content |
179 | 179 |
180 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_
H_ | 180 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_
H_ |
OLD | NEW |