Index: chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h |
diff --git a/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h b/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h |
index 277f712787d4e0371aabf2c8f89359603636935b..dfa6b976d027624a5592c8660f7385b2e4ade980 100644 |
--- a/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h |
+++ b/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h |
@@ -5,19 +5,54 @@ |
#ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_TO_LOCAL_SYNCER_H_ |
#define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_TO_LOCAL_SYNCER_H_ |
+#include "base/memory/weak_ptr.h" |
+#include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h" |
#include "chrome/browser/sync_file_system/sync_callbacks.h" |
#include "chrome/browser/sync_file_system/sync_task.h" |
+#include "chrome/browser/sync_file_system/remote_change_processor.h" |
+ |
+namespace drive { |
+class DriveServiceInterface; |
+} |
namespace sync_file_system { |
namespace drive_backend { |
+class MetadataDatabase; |
+class SyncEngineContext; |
+ |
class RemoteToLocalSyncer : public SyncTask { |
public: |
- RemoteToLocalSyncer(); |
+ enum Priority { |
+ PRIORITY_NORMAL = 1 << 0, |
+ PRIORITY_LOW = 1 << 1, |
+ }; |
+ |
+ RemoteToLocalSyncer(SyncEngineContext* sync_context, |
+ int priorities); |
kinuko
2013/11/05 13:36:13
Please add a comment.
"|priorities| must be a bit
tzik
2013/11/06 04:56:08
Done.
|
virtual ~RemoteToLocalSyncer(); |
virtual void Run(const SyncStatusCallback& callback) OVERRIDE; |
private: |
+ void ResolveTrivial(const SyncStatusCallback& callback); |
+ void DidResolveTrivial(const SyncStatusCallback& callback, |
+ SyncStatusCode status); |
+ void DidPrepare(const SyncStatusCallback& callback, |
+ SyncStatusCode status, |
+ const SyncFileMetadata& metadata, |
+ const FileChangeList& changes); |
+ |
+ drive::DriveServiceInterface* drive_service(); |
+ MetadataDatabase* metadata_database(); |
+ RemoteChangeProcessor* remote_change_processor(); |
+ |
+ SyncEngineContext* sync_context_; // Not owned. |
+ |
+ int priorities_; |
+ FileTracker dirty_tracker_; |
+ |
+ base::WeakPtrFactory<RemoteToLocalSyncer> weak_ptr_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(RemoteToLocalSyncer); |
}; |