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

Side by Side 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 unified diff | Download patch
OLDNEW
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_DRIVE_BACKEND_REMOTE_TO_LOCAL_SYNCER_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_TO_LOCAL_SYNCER_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_TO_LOCAL_SYNCER_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_TO_LOCAL_SYNCER_H_
7 7
8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h"
8 #include "chrome/browser/sync_file_system/sync_callbacks.h" 10 #include "chrome/browser/sync_file_system/sync_callbacks.h"
9 #include "chrome/browser/sync_file_system/sync_task.h" 11 #include "chrome/browser/sync_file_system/sync_task.h"
12 #include "chrome/browser/sync_file_system/remote_change_processor.h"
13
14 namespace drive {
15 class DriveServiceInterface;
16 }
10 17
11 namespace sync_file_system { 18 namespace sync_file_system {
12 namespace drive_backend { 19 namespace drive_backend {
13 20
21 class MetadataDatabase;
22 class SyncEngineContext;
23
14 class RemoteToLocalSyncer : public SyncTask { 24 class RemoteToLocalSyncer : public SyncTask {
15 public: 25 public:
16 RemoteToLocalSyncer(); 26 enum Priority {
27 PRIORITY_NORMAL = 1 << 0,
28 PRIORITY_LOW = 1 << 1,
29 };
30
31 RemoteToLocalSyncer(SyncEngineContext* sync_context,
32 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.
17 virtual ~RemoteToLocalSyncer(); 33 virtual ~RemoteToLocalSyncer();
18 virtual void Run(const SyncStatusCallback& callback) OVERRIDE; 34 virtual void Run(const SyncStatusCallback& callback) OVERRIDE;
19 35
20 private: 36 private:
37 void ResolveTrivial(const SyncStatusCallback& callback);
38 void DidResolveTrivial(const SyncStatusCallback& callback,
39 SyncStatusCode status);
40 void DidPrepare(const SyncStatusCallback& callback,
41 SyncStatusCode status,
42 const SyncFileMetadata& metadata,
43 const FileChangeList& changes);
44
45 drive::DriveServiceInterface* drive_service();
46 MetadataDatabase* metadata_database();
47 RemoteChangeProcessor* remote_change_processor();
48
49 SyncEngineContext* sync_context_; // Not owned.
50
51 int priorities_;
52 FileTracker dirty_tracker_;
53
54 base::WeakPtrFactory<RemoteToLocalSyncer> weak_ptr_factory_;
55
21 DISALLOW_COPY_AND_ASSIGN(RemoteToLocalSyncer); 56 DISALLOW_COPY_AND_ASSIGN(RemoteToLocalSyncer);
22 }; 57 };
23 58
24 } // namespace drive_backend 59 } // namespace drive_backend
25 } // namespace sync_file_system 60 } // namespace sync_file_system
26 61
27 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_TO_LOCAL_SYNCER_ H_ 62 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_TO_LOCAL_SYNCER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698