| 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 <memory> |
| 9 #include <string> | 10 #include <string> |
| 10 | 11 |
| 11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 12 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
| 13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
| 15 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 16 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
| 17 #include "chrome/browser/sync_file_system/conflict_resolution_policy.h" | 18 #include "chrome/browser/sync_file_system/conflict_resolution_policy.h" |
| 18 #include "chrome/browser/sync_file_system/file_status_observer.h" | 19 #include "chrome/browser/sync_file_system/file_status_observer.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 void CheckIfIdle(); | 85 void CheckIfIdle(); |
| 85 | 86 |
| 86 TaskLogger* task_logger() { return &task_logger_; } | 87 TaskLogger* task_logger() { return &task_logger_; } |
| 87 | 88 |
| 88 void CallOnIdleForTesting(const base::Closure& callback); | 89 void CallOnIdleForTesting(const base::Closure& callback); |
| 89 | 90 |
| 90 private: | 91 private: |
| 91 friend class SyncFileSystemServiceFactory; | 92 friend class SyncFileSystemServiceFactory; |
| 92 friend class SyncFileSystemServiceTest; | 93 friend class SyncFileSystemServiceTest; |
| 93 friend class SyncFileSystemTest; | 94 friend class SyncFileSystemTest; |
| 94 friend struct base::DefaultDeleter<SyncFileSystemService>; | 95 friend std::default_delete<SyncFileSystemService>; |
| 95 friend class LocalSyncRunner; | 96 friend class LocalSyncRunner; |
| 96 friend class RemoteSyncRunner; | 97 friend class RemoteSyncRunner; |
| 97 | 98 |
| 98 explicit SyncFileSystemService(Profile* profile); | 99 explicit SyncFileSystemService(Profile* profile); |
| 99 ~SyncFileSystemService() override; | 100 ~SyncFileSystemService() override; |
| 100 | 101 |
| 101 void Initialize(scoped_ptr<LocalFileSyncService> local_file_service, | 102 void Initialize(scoped_ptr<LocalFileSyncService> local_file_service, |
| 102 scoped_ptr<RemoteFileSyncService> remote_file_service); | 103 scoped_ptr<RemoteFileSyncService> remote_file_service); |
| 103 | 104 |
| 104 // Callbacks for InitializeForApp. | 105 // Callbacks for InitializeForApp. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 184 |
| 184 bool promoting_demoted_changes_; | 185 bool promoting_demoted_changes_; |
| 185 base::Closure idle_callback_; | 186 base::Closure idle_callback_; |
| 186 | 187 |
| 187 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemService); | 188 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemService); |
| 188 }; | 189 }; |
| 189 | 190 |
| 190 } // namespace sync_file_system | 191 } // namespace sync_file_system |
| 191 | 192 |
| 192 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ | 193 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_SERVICE_H_ |
| OLD | NEW |