Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: webkit/fileapi/syncable/local_file_sync_context.h

Issue 11238054: Add OnSyncEnabled/OnWriteEnabled notification handling to operation runner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added export Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/fileapi/syncable/local_file_sync_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/syncable/local_file_sync_context.h
diff --git a/webkit/fileapi/syncable/local_file_sync_context.h b/webkit/fileapi/syncable/local_file_sync_context.h
index c02d81a6ce3f739d2d8deac244f64bae9a00fb77..74b4a90fe04e57c2a1dfa1d2b202c1a0073b893f 100644
--- a/webkit/fileapi/syncable/local_file_sync_context.h
+++ b/webkit/fileapi/syncable/local_file_sync_context.h
@@ -18,6 +18,7 @@
#include "base/memory/weak_ptr.h"
#include "googleurl/src/gurl.h"
#include "webkit/fileapi/syncable/file_change.h"
+#include "webkit/fileapi/syncable/local_file_sync_status.h"
#include "webkit/fileapi/syncable/sync_status_code.h"
#include "webkit/storage/webkit_storage_export.h"
@@ -27,6 +28,7 @@ class SingleThreadTaskRunner;
namespace fileapi {
+class FileChange;
class FileSystemContext;
class LocalFileChangeTracker;
class SyncableFileOperationRunner;
@@ -59,12 +61,15 @@ class WEBKIT_STORAGE_EXPORT LocalFileSyncContext
// OperationRunner is accessible only on IO thread.
base::WeakPtr<SyncableFileOperationRunner> operation_runner() const;
+ // SyncContext is accessible only on IO thread.
+ LocalFileSyncStatus* sync_status() const;
+
private:
typedef std::deque<StatusCallback> StatusCallbackQueue;
friend class base::RefCountedThreadSafe<LocalFileSyncContext>;
friend class CannedSyncableFileSystem;
- ~LocalFileSyncContext();
+ virtual ~LocalFileSyncContext();
void ShutdownOnIOThread();
@@ -91,16 +96,22 @@ class WEBKIT_STORAGE_EXPORT LocalFileSyncContext
// OperationRunner. This must be accessed only on IO thread.
scoped_ptr<SyncableFileOperationRunner> operation_runner_;
+ // Keeps track of writing/syncing status.
+ // This must be accessed only on IO thread.
+ scoped_ptr<LocalFileSyncStatus> sync_status_;
+
// Pointers to file system contexts that have been initialized for
// synchronization (i.e. that own this instance).
// This must be accessed only on UI thread.
std::set<FileSystemContext*> file_system_contexts_;
+ // Accessed only on UI thread.
std::map<FileSystemContext*, StatusCallbackQueue>
pending_initialize_callbacks_;
// Origin to context map. (Assuming that as far as we're in the same
// profile single origin wouldn't belong to multiple FileSystemContexts.)
+ // Accessed only on UI thread.
std::map<GURL, FileSystemContext*> origin_to_contexts_;
DISALLOW_COPY_AND_ASSIGN(LocalFileSyncContext);
« no previous file with comments | « no previous file | webkit/fileapi/syncable/local_file_sync_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698