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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "chrome/browser/sync_file_system/conflict_resolution_policy.h" | 15 #include "chrome/browser/sync_file_system/conflict_resolution_policy.h" |
16 #include "chrome/browser/sync_file_system/sync_callbacks.h" | 16 #include "chrome/browser/sync_file_system/sync_callbacks.h" |
17 #include "chrome/browser/sync_file_system/sync_file_metadata.h" | 17 #include "chrome/browser/sync_file_system/sync_file_metadata.h" |
18 #include "webkit/browser/fileapi/file_system_url.h" | 18 #include "storage/browser/fileapi/file_system_url.h" |
19 | 19 |
20 class BrowserContextKeyedServiceFactory; | 20 class BrowserContextKeyedServiceFactory; |
21 class GURL; | 21 class GURL; |
22 | 22 |
23 namespace base { | 23 namespace base { |
24 class ListValue; | 24 class ListValue; |
25 } | 25 } |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 class BrowserContext; | 28 class BrowserContext; |
29 } | 29 } |
30 | 30 |
31 namespace webkit_blob { | 31 namespace storage { |
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 class TaskLogger; |
41 | 41 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 // For GetOriginStatusMap. | 121 // For GetOriginStatusMap. |
122 typedef std::map<GURL, std::string> OriginStatusMap; | 122 typedef std::map<GURL, std::string> OriginStatusMap; |
123 typedef base::Callback<void(scoped_ptr<OriginStatusMap> status_map)> | 123 typedef base::Callback<void(scoped_ptr<OriginStatusMap> status_map)> |
124 StatusMapCallback; | 124 StatusMapCallback; |
125 | 125 |
126 // For GetRemoteVersions. | 126 // For GetRemoteVersions. |
127 typedef base::Callback<void(SyncStatusCode status, | 127 typedef base::Callback<void(SyncStatusCode status, |
128 const std::vector<Version>& versions)> | 128 const std::vector<Version>& versions)> |
129 RemoteVersionsCallback; | 129 RemoteVersionsCallback; |
130 typedef base::Callback<void(SyncStatusCode status, | 130 typedef base::Callback< |
131 webkit_blob::ScopedFile downloaded)> | 131 void(SyncStatusCode status, storage::ScopedFile downloaded)> |
132 DownloadVersionCallback; | 132 DownloadVersionCallback; |
133 | 133 |
134 // For DumpFile. | 134 // For DumpFile. |
135 typedef base::Callback<void(scoped_ptr<base::ListValue> list)> ListCallback; | 135 typedef base::Callback<void(scoped_ptr<base::ListValue> list)> ListCallback; |
136 | 136 |
137 // Creates an initialized RemoteFileSyncService for backend |version| | 137 // Creates an initialized RemoteFileSyncService for backend |version| |
138 // for |context|. | 138 // for |context|. |
139 static scoped_ptr<RemoteFileSyncService> CreateForBrowserContext( | 139 static scoped_ptr<RemoteFileSyncService> CreateForBrowserContext( |
140 BackendVersion version, | 140 BackendVersion version, |
141 content::BrowserContext* context, | 141 content::BrowserContext* context, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 virtual void PromoteDemotedChanges(const base::Closure& callback) = 0; | 221 virtual void PromoteDemotedChanges(const base::Closure& callback) = 0; |
222 | 222 |
223 private: | 223 private: |
224 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); | 224 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); |
225 }; | 225 }; |
226 | 226 |
227 } // namespace sync_file_system | 227 } // namespace sync_file_system |
228 | 228 |
229 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ | 229 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
OLD | NEW |