| 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 COMPONENTS_DRIVE_CHROMEOS_SYNC_CLIENT_H_ | 5 #ifndef COMPONENTS_DRIVE_CHROMEOS_SYNC_CLIENT_H_ |
| 6 #define COMPONENTS_DRIVE_CHROMEOS_SYNC_CLIENT_H_ | 6 #define COMPONENTS_DRIVE_CHROMEOS_SYNC_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // Returns false if no task is found for the spcecified ID. | 73 // Returns false if no task is found for the spcecified ID. |
| 74 bool WaitForUpdateTaskToComplete(const std::string& local_id, | 74 bool WaitForUpdateTaskToComplete(const std::string& local_id, |
| 75 const FileOperationCallback& callback); | 75 const FileOperationCallback& callback); |
| 76 | 76 |
| 77 // Starts processing the backlog (i.e. pinned-but-not-filed files and | 77 // Starts processing the backlog (i.e. pinned-but-not-filed files and |
| 78 // dirty-but-not-uploaded files). Kicks off retrieval of the local | 78 // dirty-but-not-uploaded files). Kicks off retrieval of the local |
| 79 // IDs of these files, and then starts the sync loop. | 79 // IDs of these files, and then starts the sync loop. |
| 80 void StartProcessingBacklog(); | 80 void StartProcessingBacklog(); |
| 81 | 81 |
| 82 // Starts checking the existing pinned files to see if these are | 82 // Starts checking the existing pinned files to see if these are |
| 83 // up-to-date. If stale files are detected, the local IDs of these files | 83 // up to date. If stale files are detected, the local IDs of these files |
| 84 // are added and the sync loop is started. | 84 // are added and the sync loop is started. |
| 85 void StartCheckingExistingPinnedFiles(); | 85 void StartCheckingExistingPinnedFiles(); |
| 86 | 86 |
| 87 // Sets a delay for testing. | 87 // Sets a delay for testing. |
| 88 void set_delay_for_testing(const base::TimeDelta& delay) { | 88 void set_delay_for_testing(const base::TimeDelta& delay) { |
| 89 delay_ = delay; | 89 delay_ = delay; |
| 90 } | 90 } |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 // Types of sync tasks. | 93 // Types of sync tasks. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // invalidate its weak pointers before any other members are destroyed. | 192 // invalidate its weak pointers before any other members are destroyed. |
| 193 base::WeakPtrFactory<SyncClient> weak_ptr_factory_; | 193 base::WeakPtrFactory<SyncClient> weak_ptr_factory_; |
| 194 | 194 |
| 195 DISALLOW_COPY_AND_ASSIGN(SyncClient); | 195 DISALLOW_COPY_AND_ASSIGN(SyncClient); |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 } // namespace internal | 198 } // namespace internal |
| 199 } // namespace drive | 199 } // namespace drive |
| 200 | 200 |
| 201 #endif // COMPONENTS_DRIVE_CHROMEOS_SYNC_CLIENT_H_ | 201 #endif // COMPONENTS_DRIVE_CHROMEOS_SYNC_CLIENT_H_ |
| OLD | NEW |