| 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 STORAGE_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ | 5 #ifndef STORAGE_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ |
| 6 #define STORAGE_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ | 6 #define STORAGE_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 void GetOriginsForHostOnFileTaskRunner(FileSystemType type, | 111 void GetOriginsForHostOnFileTaskRunner(FileSystemType type, |
| 112 const std::string& host, | 112 const std::string& host, |
| 113 std::set<GURL>* origins) override; | 113 std::set<GURL>* origins) override; |
| 114 int64_t GetOriginUsageOnFileTaskRunner(FileSystemContext* context, | 114 int64_t GetOriginUsageOnFileTaskRunner(FileSystemContext* context, |
| 115 const GURL& origin_url, | 115 const GURL& origin_url, |
| 116 FileSystemType type) override; | 116 FileSystemType type) override; |
| 117 scoped_refptr<QuotaReservation> CreateQuotaReservationOnFileTaskRunner( | 117 scoped_refptr<QuotaReservation> CreateQuotaReservationOnFileTaskRunner( |
| 118 const GURL& origin_url, | 118 const GURL& origin_url, |
| 119 FileSystemType type) override; | 119 FileSystemType type) override; |
| 120 | 120 |
| 121 // Get details on the files saved for the specified |origin_url|. Returns |
| 122 // the total size and last modified time for the set of all files stored |
| 123 // for the particular origin. |total_size| = 0 and |last_modified_time| = |
| 124 // base::Time::UnixEpoch() if no files found. |
| 125 void GetOriginDetailsOnFileTaskRunner(FileSystemContext* context, |
| 126 const GURL& origin_url, |
| 127 int64_t* total_size, |
| 128 base::Time* last_modified_time); |
| 129 |
| 121 private: | 130 private: |
| 122 friend class content::PluginPrivateFileSystemBackendTest; | 131 friend class content::PluginPrivateFileSystemBackendTest; |
| 123 | 132 |
| 124 ObfuscatedFileUtil* obfuscated_file_util(); | 133 ObfuscatedFileUtil* obfuscated_file_util(); |
| 125 const base::FilePath& base_path() const { return base_path_; } | 134 const base::FilePath& base_path() const { return base_path_; } |
| 126 | 135 |
| 127 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; | 136 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; |
| 128 const FileSystemOptions file_system_options_; | 137 const FileSystemOptions file_system_options_; |
| 129 const base::FilePath base_path_; | 138 const base::FilePath base_path_; |
| 130 std::unique_ptr<AsyncFileUtil> file_util_; | 139 std::unique_ptr<AsyncFileUtil> file_util_; |
| 131 FileSystemIDToPluginMap* plugin_map_; // Owned by file_util_. | 140 FileSystemIDToPluginMap* plugin_map_; // Owned by file_util_. |
| 132 base::WeakPtrFactory<PluginPrivateFileSystemBackend> weak_factory_; | 141 base::WeakPtrFactory<PluginPrivateFileSystemBackend> weak_factory_; |
| 133 | 142 |
| 134 DISALLOW_COPY_AND_ASSIGN(PluginPrivateFileSystemBackend); | 143 DISALLOW_COPY_AND_ASSIGN(PluginPrivateFileSystemBackend); |
| 135 }; | 144 }; |
| 136 | 145 |
| 137 } // namespace storage | 146 } // namespace storage |
| 138 | 147 |
| 139 #endif // STORAGE_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ | 148 #endif // STORAGE_BROWSER_FILEAPI_PLUGIN_PRIVATE_FILE_SYSTEM_BACKEND_H_ |
| OLD | NEW |