| 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_DRIVE_SYNC_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_CLIENT_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 namespace file_system { | 29 namespace file_system { |
| 30 class DownloadOperation; | 30 class DownloadOperation; |
| 31 class OperationObserver; | 31 class OperationObserver; |
| 32 } | 32 } |
| 33 | 33 |
| 34 namespace internal { | 34 namespace internal { |
| 35 | 35 |
| 36 class ChangeListLoader; | 36 class ChangeListLoader; |
| 37 class EntryUpdatePerformer; | 37 class EntryUpdatePerformer; |
| 38 class FileCache; | 38 class FileCache; |
| 39 class LoaderController; |
| 39 class ResourceMetadata; | 40 class ResourceMetadata; |
| 40 | 41 |
| 41 // The SyncClient is used to synchronize pinned files on Drive and the | 42 // The SyncClient is used to synchronize pinned files on Drive and the |
| 42 // cache on the local drive. | 43 // cache on the local drive. |
| 43 // | 44 // |
| 44 // If the user logs out before fetching of the pinned files is complete, this | 45 // If the user logs out before fetching of the pinned files is complete, this |
| 45 // client resumes fetching operations next time the user logs in, based on | 46 // client resumes fetching operations next time the user logs in, based on |
| 46 // the states left in the cache. | 47 // the states left in the cache. |
| 47 class SyncClient { | 48 class SyncClient { |
| 48 public: | 49 public: |
| 49 SyncClient(base::SequencedTaskRunner* blocking_task_runner, | 50 SyncClient(base::SequencedTaskRunner* blocking_task_runner, |
| 50 file_system::OperationObserver* observer, | 51 file_system::OperationObserver* observer, |
| 51 JobScheduler* scheduler, | 52 JobScheduler* scheduler, |
| 52 ResourceMetadata* metadata, | 53 ResourceMetadata* metadata, |
| 53 FileCache* cache, | 54 FileCache* cache, |
| 54 ChangeListLoader* change_list_loader, | 55 LoaderController* loader_controller, |
| 55 const base::FilePath& temporary_file_directory); | 56 const base::FilePath& temporary_file_directory); |
| 56 virtual ~SyncClient(); | 57 virtual ~SyncClient(); |
| 57 | 58 |
| 58 // Adds a fetch task. | 59 // Adds a fetch task. |
| 59 void AddFetchTask(const std::string& local_id); | 60 void AddFetchTask(const std::string& local_id); |
| 60 | 61 |
| 61 // Removes a fetch task. | 62 // Removes a fetch task. |
| 62 void RemoveFetchTask(const std::string& local_id); | 63 void RemoveFetchTask(const std::string& local_id); |
| 63 | 64 |
| 64 // Adds a update task. | 65 // Adds a update task. |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // invalidate its weak pointers before any other members are destroyed. | 171 // invalidate its weak pointers before any other members are destroyed. |
| 171 base::WeakPtrFactory<SyncClient> weak_ptr_factory_; | 172 base::WeakPtrFactory<SyncClient> weak_ptr_factory_; |
| 172 | 173 |
| 173 DISALLOW_COPY_AND_ASSIGN(SyncClient); | 174 DISALLOW_COPY_AND_ASSIGN(SyncClient); |
| 174 }; | 175 }; |
| 175 | 176 |
| 176 } // namespace internal | 177 } // namespace internal |
| 177 } // namespace drive | 178 } // namespace drive |
| 178 | 179 |
| 179 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_CLIENT_H_ | 180 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_CLIENT_H_ |
| OLD | NEW |