Index: chrome/browser/sync_file_system/local/sync_file_system_backend.h |
diff --git a/chrome/browser/sync_file_system/local/sync_file_system_backend.h b/chrome/browser/sync_file_system/local/sync_file_system_backend.h |
index fdba97961260de5e6cadfac57069b5b0f42fb507..31ef0e4cbe5df7b3ac176e6aacc304091497d0c3 100644 |
--- a/chrome/browser/sync_file_system/local/sync_file_system_backend.h |
+++ b/chrome/browser/sync_file_system/local/sync_file_system_backend.h |
@@ -5,6 +5,9 @@ |
#ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNC_FILE_SYSTEM_BACKEND_H_ |
#define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNC_FILE_SYSTEM_BACKEND_H_ |
+#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/sync_file_system/sync_callbacks.h" |
+#include "chrome/browser/sync_file_system/sync_status_code.h" |
#include "webkit/browser/fileapi/file_system_backend.h" |
#include "webkit/browser/fileapi/file_system_quota_util.h" |
#include "webkit/browser/fileapi/sandbox_file_system_backend_delegate.h" |
@@ -17,7 +20,7 @@ class LocalFileSyncContext; |
class SyncFileSystemBackend |
: public fileapi::FileSystemBackend { |
public: |
- SyncFileSystemBackend(); |
+ explicit SyncFileSystemBackend(Profile* profile); |
virtual ~SyncFileSystemBackend(); |
// FileSystemBackend overrides. |
@@ -65,13 +68,38 @@ class SyncFileSystemBackend |
} |
void set_sync_context(sync_file_system::LocalFileSyncContext* sync_context); |
+ // This should be used only for testing. |
+ void set_skip_initialize_syncfs_service_for_testing(bool flag) { |
+ skip_initialize_syncfs_service_for_testing_ = flag; |
+ } |
+ |
private: |
// Owned by FileSystemContext. |
fileapi::SandboxFileSystemBackendDelegate* delegate_; |
+ // Not owned. |
+ fileapi::FileSystemContext* context_; |
+ Profile* profile_; |
+ |
scoped_ptr<sync_file_system::LocalFileChangeTracker> change_tracker_; |
scoped_refptr<sync_file_system::LocalFileSyncContext> sync_context_; |
+ // A flag to skip the initialization sequence of SyncFileSystemService for |
+ // testing. |
+ bool skip_initialize_syncfs_service_for_testing_; |
+ |
+ fileapi::SandboxFileSystemBackendDelegate* GetDelegate() const; |
+ |
+ void InitializeSyncFileSystemService( |
+ const GURL& origin_url, |
+ const SyncStatusCallback& callback); |
+ void DidInitializeSyncFileSystemService( |
+ const GURL& origin_url, |
+ fileapi::FileSystemType type, |
+ fileapi::OpenFileSystemMode mode, |
+ const OpenFileSystemCallback& callback, |
+ SyncStatusCode status); |
+ |
DISALLOW_COPY_AND_ASSIGN(SyncFileSystemBackend); |
}; |