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_REMOTE_FILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 namespace webkit_blob { | 31 namespace webkit_blob { |
32 class ScopedFile; | 32 class ScopedFile; |
33 } | 33 } |
34 | 34 |
35 namespace sync_file_system { | 35 namespace sync_file_system { |
36 | 36 |
37 class FileStatusObserver; | 37 class FileStatusObserver; |
38 class LocalChangeProcessor; | 38 class LocalChangeProcessor; |
39 class RemoteChangeProcessor; | 39 class RemoteChangeProcessor; |
| 40 class TaskLogger; |
40 | 41 |
41 enum RemoteServiceState { | 42 enum RemoteServiceState { |
42 // Remote service is up and running, or has not seen any errors yet. | 43 // Remote service is up and running, or has not seen any errors yet. |
43 // The consumer of this service can make new requests while the | 44 // The consumer of this service can make new requests while the |
44 // service is in this state. | 45 // service is in this state. |
45 REMOTE_SERVICE_OK = 0, | 46 REMOTE_SERVICE_OK = 0, |
46 | 47 |
47 // Remote service is temporarily unavailable due to network, | 48 // Remote service is temporarily unavailable due to network, |
48 // authentication or some other temporary failure. | 49 // authentication or some other temporary failure. |
49 // This state may be automatically resolved when the underlying | 50 // This state may be automatically resolved when the underlying |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 webkit_blob::ScopedFile downloaded)> | 124 webkit_blob::ScopedFile downloaded)> |
124 DownloadVersionCallback; | 125 DownloadVersionCallback; |
125 | 126 |
126 // For DumpFile. | 127 // For DumpFile. |
127 typedef base::Callback<void(scoped_ptr<base::ListValue> list)> ListCallback; | 128 typedef base::Callback<void(scoped_ptr<base::ListValue> list)> ListCallback; |
128 | 129 |
129 // Creates an initialized RemoteFileSyncService for backend |version| | 130 // Creates an initialized RemoteFileSyncService for backend |version| |
130 // for |context|. | 131 // for |context|. |
131 static scoped_ptr<RemoteFileSyncService> CreateForBrowserContext( | 132 static scoped_ptr<RemoteFileSyncService> CreateForBrowserContext( |
132 BackendVersion version, | 133 BackendVersion version, |
133 content::BrowserContext* context); | 134 content::BrowserContext* context, |
| 135 TaskLogger* task_logger); |
134 | 136 |
135 // Returns BrowserContextKeyedServiceFactory's an instance of | 137 // Returns BrowserContextKeyedServiceFactory's an instance of |
136 // RemoteFileSyncService for backend |version| depends on. | 138 // RemoteFileSyncService for backend |version| depends on. |
137 static void AppendDependsOnFactories( | 139 static void AppendDependsOnFactories( |
138 BackendVersion version, | 140 BackendVersion version, |
139 std::set<BrowserContextKeyedServiceFactory*>* factories); | 141 std::set<BrowserContextKeyedServiceFactory*>* factories); |
140 | 142 |
141 RemoteFileSyncService() {} | 143 RemoteFileSyncService() {} |
142 virtual ~RemoteFileSyncService() {} | 144 virtual ~RemoteFileSyncService() {} |
143 | 145 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 213 |
212 virtual void PromoteDemotedChanges() = 0; | 214 virtual void PromoteDemotedChanges() = 0; |
213 | 215 |
214 private: | 216 private: |
215 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); | 217 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); |
216 }; | 218 }; |
217 | 219 |
218 } // namespace sync_file_system | 220 } // namespace sync_file_system |
219 | 221 |
220 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ | 222 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
OLD | NEW |