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

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

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
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_LOCAL_TO_REMOTE_SYNCER_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 28 matching lines...) Expand all
39 class SyncEngineContext; 39 class SyncEngineContext;
40 40
41 class LocalToRemoteSyncer : public SyncTask { 41 class LocalToRemoteSyncer : public SyncTask {
42 public: 42 public:
43 typedef base::Callback<void(scoped_ptr<SyncTaskToken>)> Continuation; 43 typedef base::Callback<void(scoped_ptr<SyncTaskToken>)> Continuation;
44 44
45 LocalToRemoteSyncer(SyncEngineContext* sync_context, 45 LocalToRemoteSyncer(SyncEngineContext* sync_context,
46 const SyncFileMetadata& local_metadata, 46 const SyncFileMetadata& local_metadata,
47 const FileChange& local_change, 47 const FileChange& local_change,
48 const base::FilePath& local_path, 48 const base::FilePath& local_path,
49 const fileapi::FileSystemURL& url); 49 const storage::FileSystemURL& url);
50 virtual ~LocalToRemoteSyncer(); 50 virtual ~LocalToRemoteSyncer();
51 virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) OVERRIDE; 51 virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) OVERRIDE;
52 52
53 const fileapi::FileSystemURL& url() const { return url_; } 53 const storage::FileSystemURL& url() const { return url_; }
54 const base::FilePath& target_path() const { return target_path_; } 54 const base::FilePath& target_path() const { return target_path_; }
55 SyncAction sync_action() const { return sync_action_; } 55 SyncAction sync_action() const { return sync_action_; }
56 bool needs_remote_change_listing() const { 56 bool needs_remote_change_listing() const {
57 return needs_remote_change_listing_; 57 return needs_remote_change_listing_;
58 } 58 }
59 59
60 private: 60 private:
61 void MoveToBackground(const Continuation& continuation, 61 void MoveToBackground(const Continuation& continuation,
62 scoped_ptr<SyncTaskToken> token); 62 scoped_ptr<SyncTaskToken> token);
63 void ContinueAsBackgroundTask(const Continuation& continuation, 63 void ContinueAsBackgroundTask(const Continuation& continuation,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 bool IsContextReady(); 106 bool IsContextReady();
107 drive::DriveServiceInterface* drive_service(); 107 drive::DriveServiceInterface* drive_service();
108 drive::DriveUploaderInterface* drive_uploader(); 108 drive::DriveUploaderInterface* drive_uploader();
109 MetadataDatabase* metadata_database(); 109 MetadataDatabase* metadata_database();
110 110
111 SyncEngineContext* sync_context_; // Not owned. 111 SyncEngineContext* sync_context_; // Not owned.
112 112
113 FileChange local_change_; 113 FileChange local_change_;
114 bool local_is_missing_; 114 bool local_is_missing_;
115 base::FilePath local_path_; 115 base::FilePath local_path_;
116 fileapi::FileSystemURL url_; 116 storage::FileSystemURL url_;
117 SyncAction sync_action_; 117 SyncAction sync_action_;
118 118
119 scoped_ptr<FileTracker> remote_file_tracker_; 119 scoped_ptr<FileTracker> remote_file_tracker_;
120 scoped_ptr<FileTracker> remote_parent_folder_tracker_; 120 scoped_ptr<FileTracker> remote_parent_folder_tracker_;
121 base::FilePath target_path_; 121 base::FilePath target_path_;
122 int64 remote_file_change_id_; 122 int64 remote_file_change_id_;
123 123
124 bool retry_on_success_; 124 bool retry_on_success_;
125 bool needs_remote_change_listing_; 125 bool needs_remote_change_listing_;
126 126
127 scoped_ptr<FolderCreator> folder_creator_; 127 scoped_ptr<FolderCreator> folder_creator_;
128 128
129 base::WeakPtrFactory<LocalToRemoteSyncer> weak_ptr_factory_; 129 base::WeakPtrFactory<LocalToRemoteSyncer> weak_ptr_factory_;
130 130
131 DISALLOW_COPY_AND_ASSIGN(LocalToRemoteSyncer); 131 DISALLOW_COPY_AND_ASSIGN(LocalToRemoteSyncer);
132 }; 132 };
133 133
134 } // namespace drive_backend 134 } // namespace drive_backend
135 } // namespace sync_file_system 135 } // namespace sync_file_system
136 136
137 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_ H_ 137 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698