| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ | 5 #ifndef WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ |
| 6 #define WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ | 6 #define WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/files/scoped_temp_dir.h" |
| 12 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 13 #include "base/observer_list_threadsafe.h" | 14 #include "base/observer_list_threadsafe.h" |
| 14 #include "base/platform_file.h" | 15 #include "base/platform_file.h" |
| 15 #include "base/scoped_temp_dir.h" | |
| 16 #include "webkit/fileapi/file_system_types.h" | 16 #include "webkit/fileapi/file_system_types.h" |
| 17 #include "webkit/fileapi/file_system_url.h" | 17 #include "webkit/fileapi/file_system_url.h" |
| 18 #include "webkit/fileapi/file_system_util.h" | 18 #include "webkit/fileapi/file_system_util.h" |
| 19 #include "webkit/fileapi/syncable/local_file_sync_status.h" | 19 #include "webkit/fileapi/syncable/local_file_sync_status.h" |
| 20 #include "webkit/fileapi/syncable/sync_status_code.h" | 20 #include "webkit/fileapi/syncable/sync_status_code.h" |
| 21 #include "webkit/quota/quota_types.h" | 21 #include "webkit/quota/quota_types.h" |
| 22 | 22 |
| 23 namespace base { | 23 namespace base { |
| 24 class MessageLoopProxy; | 24 class MessageLoopProxy; |
| 25 class SingleThreadTaskRunner; | 25 class SingleThreadTaskRunner; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 const quota::StatusCallback& callback); | 174 const quota::StatusCallback& callback); |
| 175 | 175 |
| 176 // Callbacks. | 176 // Callbacks. |
| 177 void DidOpenFileSystem(base::PlatformFileError result, | 177 void DidOpenFileSystem(base::PlatformFileError result, |
| 178 const std::string& name, | 178 const std::string& name, |
| 179 const GURL& root); | 179 const GURL& root); |
| 180 void DidInitializeFileSystemContext(SyncStatusCode status); | 180 void DidInitializeFileSystemContext(SyncStatusCode status); |
| 181 | 181 |
| 182 void InitializeSyncStatusObserver(); | 182 void InitializeSyncStatusObserver(); |
| 183 | 183 |
| 184 ScopedTempDir data_dir_; | 184 base::ScopedTempDir data_dir_; |
| 185 const std::string service_name_; | 185 const std::string service_name_; |
| 186 | 186 |
| 187 scoped_refptr<quota::QuotaManager> quota_manager_; | 187 scoped_refptr<quota::QuotaManager> quota_manager_; |
| 188 scoped_refptr<FileSystemContext> file_system_context_; | 188 scoped_refptr<FileSystemContext> file_system_context_; |
| 189 const GURL origin_; | 189 const GURL origin_; |
| 190 const FileSystemType type_; | 190 const FileSystemType type_; |
| 191 GURL root_url_; | 191 GURL root_url_; |
| 192 base::PlatformFileError result_; | 192 base::PlatformFileError result_; |
| 193 SyncStatusCode sync_status_; | 193 SyncStatusCode sync_status_; |
| 194 | 194 |
| 195 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 195 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
| 196 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; | 196 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; |
| 197 | 197 |
| 198 // Boolean flags mainly for helping debug. | 198 // Boolean flags mainly for helping debug. |
| 199 bool is_filesystem_set_up_; | 199 bool is_filesystem_set_up_; |
| 200 bool is_filesystem_opened_; | 200 bool is_filesystem_opened_; |
| 201 | 201 |
| 202 scoped_refptr<ObserverList> sync_status_observers_; | 202 scoped_refptr<ObserverList> sync_status_observers_; |
| 203 | 203 |
| 204 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); | 204 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 } // namespace fileapi | 207 } // namespace fileapi |
| 208 | 208 |
| 209 #endif // WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ | 209 #endif // WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ |
| OLD | NEW |