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

Unified Diff: chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h

Issue 59193003: [SyncFS] Add RemoteToLocalSyncer skeleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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
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);
};

Powered by Google App Engine
This is Rietveld 408576698