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

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

Issue 554213002: [SyncFS] Run RemoteToLocalSyncer as a background task (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 9108a53cb43cd95dc424177552c3084b14c55f27..2262e52a1ec185652b66da0bd360f12a5db9d0e4 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
@@ -12,6 +12,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h"
#include "chrome/browser/sync_file_system/drive_backend/sync_task.h"
+#include "chrome/browser/sync_file_system/drive_backend/sync_task_manager.h"
#include "chrome/browser/sync_file_system/remote_change_processor.h"
#include "chrome/browser/sync_file_system/sync_action.h"
#include "chrome/browser/sync_file_system/sync_callbacks.h"
@@ -41,6 +42,8 @@ class SyncEngineContext;
class RemoteToLocalSyncer : public SyncTask {
public:
+ typedef SyncTaskManager::Continuation Continuation;
+
// Conflicting trackers will have low priority for RemoteToLocalSyncer so that
// it should be resolved by LocatToRemoteSyncer.
explicit RemoteToLocalSyncer(SyncEngineContext* sync_context);
@@ -102,6 +105,11 @@ class RemoteToLocalSyncer : public SyncTask {
// - Dispatch to HandleOfflineSolvable()
void ResolveRemoteChange(scoped_ptr<SyncTaskToken> token);
+ void MoveToBackground(scoped_ptr<SyncTaskToken> token,
+ const Continuation& continuation);
+ void ContinueAsBackgroundTask(const Continuation& continuation,
+ scoped_ptr<SyncTaskToken> token);
+
// Handles missing remote metadata case.
// Fetches remote metadata and updates MetadataDatabase by that. The sync
// operation itself will be deferred to the next sync round.
@@ -132,8 +140,6 @@ class RemoteToLocalSyncer : public SyncTask {
void DidPrepareForFolderUpdate(scoped_ptr<SyncTaskToken> token,
SyncStatusCode status);
- void HandleSyncRootDeletion(scoped_ptr<SyncTaskToken> token);
-
// Handles deleted remote file. Needs Prepare() call.
// If the deleted tracker is the sync-root:
// - TODO(tzik): Needs special handling.
@@ -150,6 +156,8 @@ class RemoteToLocalSyncer : public SyncTask {
void DidPrepareForDeletion(scoped_ptr<SyncTaskToken> token,
SyncStatusCode status);
+ void HandleFileMove(scoped_ptr<SyncTaskToken> token);
+
// Handles new file. Needs Prepare() call.
void HandleContentUpdate(scoped_ptr<SyncTaskToken> token);

Powered by Google App Engine
This is Rietveld 408576698