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 WEBKIT_BROWSER_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
20 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
21 #include "base/timer.h" | 21 #include "base/timer.h" |
22 #include "googleurl/src/gurl.h" | 22 #include "googleurl/src/gurl.h" |
23 #include "webkit/browser/fileapi/syncable/local_file_sync_status.h" | 23 #include "webkit/browser/fileapi/syncable/local_file_sync_status.h" |
24 #include "webkit/browser/fileapi/syncable/sync_callbacks.h" | 24 #include "webkit/browser/fileapi/syncable/sync_callbacks.h" |
25 #include "webkit/browser/fileapi/syncable/sync_status_code.h" | 25 #include "webkit/browser/fileapi/syncable/sync_status_code.h" |
26 #include "webkit/storage/webkit_storage_export.h" | 26 #include "webkit/browser/webkit_storage_browser_export.h" |
27 | 27 |
28 namespace base { | 28 namespace base { |
29 class SingleThreadTaskRunner; | 29 class SingleThreadTaskRunner; |
30 } | 30 } |
31 | 31 |
32 namespace fileapi { | 32 namespace fileapi { |
33 class FileSystemContext; | 33 class FileSystemContext; |
34 class FileSystemURL; | 34 class FileSystemURL; |
35 } | 35 } |
36 | 36 |
37 namespace sync_file_system { | 37 namespace sync_file_system { |
38 | 38 |
39 class FileChange; | 39 class FileChange; |
40 class LocalFileChangeTracker; | 40 class LocalFileChangeTracker; |
41 struct LocalFileSyncInfo; | 41 struct LocalFileSyncInfo; |
42 class LocalOriginChangeObserver; | 42 class LocalOriginChangeObserver; |
43 class SyncableFileOperationRunner; | 43 class SyncableFileOperationRunner; |
44 | 44 |
45 // This class works as a bridge between LocalFileSyncService (which is a | 45 // This class works as a bridge between LocalFileSyncService (which is a |
46 // per-profile object) and FileSystemContext's (which is a per-storage-partition | 46 // per-profile object) and FileSystemContext's (which is a per-storage-partition |
47 // object and may exist multiple in a profile). | 47 // object and may exist multiple in a profile). |
48 // An instance of this class is shared by FileSystemContexts and outlives | 48 // An instance of this class is shared by FileSystemContexts and outlives |
49 // LocalFileSyncService. | 49 // LocalFileSyncService. |
50 class WEBKIT_STORAGE_EXPORT LocalFileSyncContext | 50 class WEBKIT_STORAGE_BROWSER_EXPORT LocalFileSyncContext |
51 : public base::RefCountedThreadSafe<LocalFileSyncContext>, | 51 : public base::RefCountedThreadSafe<LocalFileSyncContext>, |
52 public LocalFileSyncStatus::Observer { | 52 public LocalFileSyncStatus::Observer { |
53 public: | 53 public: |
54 typedef base::Callback<void( | 54 typedef base::Callback<void( |
55 SyncStatusCode status, const LocalFileSyncInfo& sync_file_info)> | 55 SyncStatusCode status, const LocalFileSyncInfo& sync_file_info)> |
56 LocalFileSyncInfoCallback; | 56 LocalFileSyncInfoCallback; |
57 | 57 |
58 typedef base::Callback<void(SyncStatusCode status, | 58 typedef base::Callback<void(SyncStatusCode status, |
59 bool has_pending_changes)> | 59 bool has_pending_changes)> |
60 HasPendingLocalChangeCallback; | 60 HasPendingLocalChangeCallback; |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 ObserverList<LocalOriginChangeObserver> origin_change_observers_; | 294 ObserverList<LocalOriginChangeObserver> origin_change_observers_; |
295 | 295 |
296 int mock_notify_changes_duration_in_sec_; | 296 int mock_notify_changes_duration_in_sec_; |
297 | 297 |
298 DISALLOW_COPY_AND_ASSIGN(LocalFileSyncContext); | 298 DISALLOW_COPY_AND_ASSIGN(LocalFileSyncContext); |
299 }; | 299 }; |
300 | 300 |
301 } // namespace sync_file_system | 301 } // namespace sync_file_system |
302 | 302 |
303 #endif // WEBKIT_BROWSER_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ | 303 #endif // WEBKIT_BROWSER_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ |
OLD | NEW |