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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h

Issue 59043010: [SyncFS] Implement RemoteToLocalSyncer::GetRemoteResource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote_sync_handling
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
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" 8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/google_apis/gdata_errorcode.h"
9 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h" 10 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h"
10 #include "chrome/browser/sync_file_system/remote_change_processor.h" 11 #include "chrome/browser/sync_file_system/remote_change_processor.h"
11 #include "chrome/browser/sync_file_system/sync_callbacks.h" 12 #include "chrome/browser/sync_file_system/sync_callbacks.h"
12 #include "chrome/browser/sync_file_system/sync_task.h" 13 #include "chrome/browser/sync_file_system/sync_task.h"
13 14
14 namespace drive { 15 namespace drive {
15 class DriveServiceInterface; 16 class DriveServiceInterface;
16 } 17 }
17 18
18 namespace drive { 19 namespace google_apis {
19 class DriveServiceInterface; 20 class ResourceEntry;
20 } 21 }
21 22
22 namespace sync_file_system { 23 namespace sync_file_system {
23 namespace drive_backend { 24 namespace drive_backend {
24 25
25 class MetadataDatabase; 26 class MetadataDatabase;
26 class SyncEngineContext; 27 class SyncEngineContext;
27 28
28 class RemoteToLocalSyncer : public SyncTask { 29 class RemoteToLocalSyncer : public SyncTask {
29 public: 30 public:
30 enum Priority { 31 enum Priority {
31 PRIORITY_NORMAL = 1 << 0, 32 PRIORITY_NORMAL = 1 << 0,
32 PRIORITY_LOW = 1 << 1, 33 PRIORITY_LOW = 1 << 1,
33 }; 34 };
34 35
35 // |priorities| must be a bitwise-or'd value of Priority. 36 // |priorities| must be a bitwise-or'd value of Priority.
36 // Conflicting trackers will have low priority for RemoteToLocalSyncer so that 37 // Conflicting trackers will have low priority for RemoteToLocalSyncer so that
37 // it should be resolved by LocatToRemoteSyncer. 38 // it should be resolved by LocatToRemoteSyncer.
38 RemoteToLocalSyncer(SyncEngineContext* sync_context, 39 RemoteToLocalSyncer(SyncEngineContext* sync_context,
39 int priorities); 40 int priorities);
40 virtual ~RemoteToLocalSyncer(); 41 virtual ~RemoteToLocalSyncer();
41 virtual void Run(const SyncStatusCallback& callback) OVERRIDE; 42 virtual void Run(const SyncStatusCallback& callback) OVERRIDE;
42 43
43 private: 44 private:
44 void AnalyzeCurrentDirtyTracker(); 45 void AnalyzeCurrentDirtyTracker();
45 46
46 void ResolveRemoteChange(const SyncStatusCallback& callback); 47 void ResolveRemoteChange(const SyncStatusCallback& callback);
47 48
48 void GetRemoteResource(const SyncStatusCallback& callback); 49 void GetRemoteResource(const SyncStatusCallback& callback);
50 void DidGetRemoteResource(const SyncStatusCallback& callback,
51 int64 change_id,
52 google_apis::GDataErrorCode error,
53 scoped_ptr<google_apis::ResourceEntry> entry);
49 54
50 void HandleDeletion(const SyncStatusCallback& callback); 55 void HandleDeletion(const SyncStatusCallback& callback);
51 void HandleNewFile(const SyncStatusCallback& callback); 56 void HandleNewFile(const SyncStatusCallback& callback);
52 void HandleContentUpdate(const SyncStatusCallback& callback); 57 void HandleContentUpdate(const SyncStatusCallback& callback);
53 void ListFolderContent(const SyncStatusCallback& callback); 58 void ListFolderContent(const SyncStatusCallback& callback);
54 void HandleRename(const SyncStatusCallback& callback); 59 void HandleRename(const SyncStatusCallback& callback);
55 void HandleReorganize(const SyncStatusCallback& callback); 60 void HandleReorganize(const SyncStatusCallback& callback);
56 void HandleOfflineSolvable(const SyncStatusCallback& callback); 61 void HandleOfflineSolvable(const SyncStatusCallback& callback);
57 62
58 void SyncCompleted(const SyncStatusCallback& callback); 63 void SyncCompleted(const SyncStatusCallback& callback);
(...skipping 28 matching lines...) Expand all
87 92
88 base::WeakPtrFactory<RemoteToLocalSyncer> weak_ptr_factory_; 93 base::WeakPtrFactory<RemoteToLocalSyncer> weak_ptr_factory_;
89 94
90 DISALLOW_COPY_AND_ASSIGN(RemoteToLocalSyncer); 95 DISALLOW_COPY_AND_ASSIGN(RemoteToLocalSyncer);
91 }; 96 };
92 97
93 } // namespace drive_backend 98 } // namespace drive_backend
94 } // namespace sync_file_system 99 } // namespace sync_file_system
95 100
96 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_TO_LOCAL_SYNCER_ H_ 101 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_TO_LOCAL_SYNCER_ H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698