OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 void OnGetResourceIdsOfBacklog( | 134 void OnGetResourceIdsOfBacklog( |
135 const std::vector<std::string>& to_fetch, | 135 const std::vector<std::string>& to_fetch, |
136 const std::vector<std::string>& to_upload); | 136 const std::vector<std::string>& to_upload); |
137 | 137 |
138 // Called when the resource IDs of pinned files are obtained. | 138 // Called when the resource IDs of pinned files are obtained. |
139 void OnGetResourceIdsOfExistingPinnedFiles( | 139 void OnGetResourceIdsOfExistingPinnedFiles( |
140 const std::vector<std::string>& resource_ids); | 140 const std::vector<std::string>& resource_ids); |
141 | 141 |
142 // Called when a file entry is obtained. | 142 // Called when a file entry is obtained. |
143 void OnGetEntryInfoByResourceId(const std::string& resource_id, | 143 void OnGetEntryInfoByResourceId(const std::string& resource_id, |
144 GDataFileError error, | 144 DriveFileError error, |
145 const FilePath& file_path, | 145 const FilePath& file_path, |
146 scoped_ptr<DriveEntryProto> entry_proto); | 146 scoped_ptr<DriveEntryProto> entry_proto); |
147 | 147 |
148 // Called when a cache entry is obtained. | 148 // Called when a cache entry is obtained. |
149 void OnGetCacheEntry(const std::string& resource_id, | 149 void OnGetCacheEntry(const std::string& resource_id, |
150 const std::string& latest_md5, | 150 const std::string& latest_md5, |
151 bool success, | 151 bool success, |
152 const DriveCacheEntry& cache_entry); | 152 const DriveCacheEntry& cache_entry); |
153 | 153 |
154 // Called when an existing cache entry and the local files are removed. | 154 // Called when an existing cache entry and the local files are removed. |
155 void OnRemove(GDataFileError error, | 155 void OnRemove(DriveFileError error, |
156 const std::string& resource_id, | 156 const std::string& resource_id, |
157 const std::string& md5); | 157 const std::string& md5); |
158 | 158 |
159 // Called when a file is pinned. | 159 // Called when a file is pinned. |
160 void OnPinned(GDataFileError error, | 160 void OnPinned(DriveFileError error, |
161 const std::string& resource_id, | 161 const std::string& resource_id, |
162 const std::string& md5); | 162 const std::string& md5); |
163 | 163 |
164 // Called when the file for |resource_id| is fetched. | 164 // Called when the file for |resource_id| is fetched. |
165 // Calls DoSyncLoop() to go back to the sync loop. | 165 // Calls DoSyncLoop() to go back to the sync loop. |
166 void OnFetchFileComplete(const SyncTask& sync_task, | 166 void OnFetchFileComplete(const SyncTask& sync_task, |
167 GDataFileError error, | 167 DriveFileError error, |
168 const FilePath& local_path, | 168 const FilePath& local_path, |
169 const std::string& ununsed_mime_type, | 169 const std::string& ununsed_mime_type, |
170 DriveFileType file_type); | 170 DriveFileType file_type); |
171 | 171 |
172 // Called when the file for |resource_id| is uploaded. | 172 // Called when the file for |resource_id| is uploaded. |
173 // Calls DoSyncLoop() to go back to the sync loop. | 173 // Calls DoSyncLoop() to go back to the sync loop. |
174 void OnUploadFileComplete(const std::string& resource_id, | 174 void OnUploadFileComplete(const std::string& resource_id, |
175 GDataFileError error); | 175 DriveFileError error); |
176 | 176 |
177 // chromeos::NetworkLibrary::NetworkManagerObserver override. | 177 // chromeos::NetworkLibrary::NetworkManagerObserver override. |
178 virtual void OnNetworkManagerChanged( | 178 virtual void OnNetworkManagerChanged( |
179 chromeos::NetworkLibrary* network_library) OVERRIDE; | 179 chromeos::NetworkLibrary* network_library) OVERRIDE; |
180 | 180 |
181 // content::NotificationObserver override. | 181 // content::NotificationObserver override. |
182 virtual void Observe(int type, | 182 virtual void Observe(int type, |
183 const content::NotificationSource& source, | 183 const content::NotificationSource& source, |
184 const content::NotificationDetails& details) OVERRIDE; | 184 const content::NotificationDetails& details) OVERRIDE; |
185 Profile* profile_; | 185 Profile* profile_; |
(...skipping 15 matching lines...) Expand all Loading... |
201 // Note: This should remain the last member so it'll be destroyed and | 201 // Note: This should remain the last member so it'll be destroyed and |
202 // invalidate its weak pointers before any other members are destroyed. | 202 // invalidate its weak pointers before any other members are destroyed. |
203 base::WeakPtrFactory<GDataSyncClient> weak_ptr_factory_; | 203 base::WeakPtrFactory<GDataSyncClient> weak_ptr_factory_; |
204 | 204 |
205 DISALLOW_COPY_AND_ASSIGN(GDataSyncClient); | 205 DISALLOW_COPY_AND_ASSIGN(GDataSyncClient); |
206 }; | 206 }; |
207 | 207 |
208 } // namespace gdata | 208 } // namespace gdata |
209 | 209 |
210 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ | 210 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ |
OLD | NEW |