| 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_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 // Check the profile's sync preference settings and call | 157 // Check the profile's sync preference settings and call |
| 158 // remote_file_service_->SetSyncEnabled() to update the status. | 158 // remote_file_service_->SetSyncEnabled() to update the status. |
| 159 // |profile_sync_service| must be non-null. | 159 // |profile_sync_service| must be non-null. |
| 160 void UpdateSyncEnabledStatus(ProfileSyncServiceBase* profile_sync_service); | 160 void UpdateSyncEnabledStatus(ProfileSyncServiceBase* profile_sync_service); |
| 161 | 161 |
| 162 // Runs the SyncProcessRunner method of all sync runners (e.g. for Local sync | 162 // Runs the SyncProcessRunner method of all sync runners (e.g. for Local sync |
| 163 // and Remote sync). | 163 // and Remote sync). |
| 164 void RunForEachSyncRunners(void(SyncProcessRunner::*method)()); | 164 void RunForEachSyncRunners(void(SyncProcessRunner::*method)()); |
| 165 | 165 |
| 166 // Returns the appropriate RemoteFileSyncService for the given origin/app. | |
| 167 // (crbug.com/324215) | |
| 168 RemoteFileSyncService* GetRemoteService(const GURL& origin); | |
| 169 | |
| 170 Profile* profile_; | 166 Profile* profile_; |
| 171 | 167 |
| 172 scoped_ptr<LocalFileSyncService> local_service_; | 168 scoped_ptr<LocalFileSyncService> local_service_; |
| 173 scoped_ptr<RemoteFileSyncService> remote_service_; | 169 scoped_ptr<RemoteFileSyncService> remote_service_; |
| 174 | 170 |
| 175 // Holds all SyncProcessRunners. | 171 // Holds all SyncProcessRunners. |
| 176 ScopedVector<SyncProcessRunner> local_sync_runners_; | 172 ScopedVector<SyncProcessRunner> local_sync_runners_; |
| 177 ScopedVector<SyncProcessRunner> remote_sync_runners_; | 173 ScopedVector<SyncProcessRunner> remote_sync_runners_; |
| 178 | 174 |
| 179 // Indicates if sync is currently enabled or not. | 175 // Indicates if sync is currently enabled or not. |
| 180 bool sync_enabled_; | 176 bool sync_enabled_; |
| 181 | 177 |
| 182 TaskLogger task_logger_; | 178 TaskLogger task_logger_; |
| 183 ObserverList<SyncEventObserver> observers_; | 179 ObserverList<SyncEventObserver> observers_; |
| 184 | 180 |
| 185 bool promoting_demoted_changes_; | 181 bool promoting_demoted_changes_; |
| 186 base::Closure idle_callback_; | 182 base::Closure idle_callback_; |
| 187 | 183 |
| 188 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemService); | 184 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemService); |
| 189 }; | 185 }; |
| 190 | 186 |
| 191 } // namespace sync_file_system | 187 } // namespace sync_file_system |
| 192 | 188 |
| 193 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ | 189 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ |
| OLD | NEW |