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