| 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 CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ | 
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ | 
| 7 | 7 | 
| 8 #include <map> | 8 #include <map> | 
| 9 #include <set> | 9 #include <set> | 
| 10 #include <string> | 10 #include <string> | 
| 11 | 11 | 
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" | 
| 13 #include "base/callback.h" | 13 #include "base/callback.h" | 
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" | 
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" | 
| 16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" | 
| 17 #include "chrome/browser/sync_file_system/local/local_origin_change_observer.h" | 17 #include "chrome/browser/sync_file_system/local/local_origin_change_observer.h" | 
| 18 #include "chrome/browser/sync_file_system/remote_change_processor.h" | 18 #include "chrome/browser/sync_file_system/remote_change_processor.h" | 
| 19 #include "chrome/browser/sync_file_system/sync_callbacks.h" | 19 #include "chrome/browser/sync_file_system/sync_callbacks.h" | 
| 20 #include "chrome/browser/sync_file_system/sync_status_code.h" | 20 #include "chrome/browser/sync_file_system/sync_status_code.h" | 
| 21 | 21 | 
| 22 class GURL; | 22 class GURL; | 
| 23 class Profile; | 23 class Profile; | 
| 24 | 24 | 
| 25 namespace fileapi { | 25 namespace fileapi { | 
| 26 class FileSystemContext; | 26 class FileSystemContext; | 
| 27 } | 27 } | 
| 28 | 28 | 
|  | 29 namespace webkit_blob { | 
|  | 30 class ScopedFile; | 
|  | 31 } | 
|  | 32 | 
| 29 namespace sync_file_system { | 33 namespace sync_file_system { | 
| 30 | 34 | 
| 31 class FileChange; | 35 class FileChange; | 
| 32 class LocalChangeProcessor; | 36 class LocalChangeProcessor; | 
| 33 class LocalFileSyncContext; | 37 class LocalFileSyncContext; | 
| 34 struct LocalFileSyncInfo; | 38 struct LocalFileSyncInfo; | 
| 35 | 39 | 
| 36 // Maintains local file change tracker and sync status. | 40 // Maintains local file change tracker and sync status. | 
| 37 // Owned by SyncFileSystemService (which is a per-profile object). | 41 // Owned by SyncFileSystemService (which is a per-profile object). | 
| 38 class LocalFileSyncService | 42 class LocalFileSyncService | 
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 174       SyncStatusCode status); | 178       SyncStatusCode status); | 
| 175 | 179 | 
| 176   // Runs local_sync_callback_ and resets it. | 180   // Runs local_sync_callback_ and resets it. | 
| 177   void RunLocalSyncCallback( | 181   void RunLocalSyncCallback( | 
| 178       SyncStatusCode status, | 182       SyncStatusCode status, | 
| 179       const fileapi::FileSystemURL& url); | 183       const fileapi::FileSystemURL& url); | 
| 180 | 184 | 
| 181   // Callbacks for ProcessLocalChange. | 185   // Callbacks for ProcessLocalChange. | 
| 182   void DidGetFileForLocalSync( | 186   void DidGetFileForLocalSync( | 
| 183       SyncStatusCode status, | 187       SyncStatusCode status, | 
| 184       const LocalFileSyncInfo& sync_file_info); | 188       const LocalFileSyncInfo& sync_file_info, | 
|  | 189       scoped_ptr<webkit_blob::ScopedFile> snapshot); | 
| 185   void ProcessNextChangeForURL( | 190   void ProcessNextChangeForURL( | 
|  | 191       scoped_ptr<webkit_blob::ScopedFile> snapshot, | 
| 186       const LocalFileSyncInfo& sync_file_info, | 192       const LocalFileSyncInfo& sync_file_info, | 
| 187       const FileChange& last_change, | 193       const FileChange& last_change, | 
| 188       const FileChangeList& changes, | 194       const FileChangeList& changes, | 
| 189       SyncStatusCode status); | 195       SyncStatusCode status); | 
| 190 | 196 | 
| 191   Profile* profile_; | 197   Profile* profile_; | 
| 192 | 198 | 
| 193   scoped_refptr<LocalFileSyncContext> sync_context_; | 199   scoped_refptr<LocalFileSyncContext> sync_context_; | 
| 194 | 200 | 
| 195   // Origin to context map. (Assuming that as far as we're in the same | 201   // Origin to context map. (Assuming that as far as we're in the same | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 210   LocalChangeProcessor* local_change_processor_; | 216   LocalChangeProcessor* local_change_processor_; | 
| 211 | 217 | 
| 212   ObserverList<Observer> change_observers_; | 218   ObserverList<Observer> change_observers_; | 
| 213 | 219 | 
| 214   DISALLOW_COPY_AND_ASSIGN(LocalFileSyncService); | 220   DISALLOW_COPY_AND_ASSIGN(LocalFileSyncService); | 
| 215 }; | 221 }; | 
| 216 | 222 | 
| 217 }  // namespace sync_file_system | 223 }  // namespace sync_file_system | 
| 218 | 224 | 
| 219 #endif  // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ | 225 #endif  // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ | 
| OLD | NEW | 
|---|