OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 enum ConnectionStatus { | 56 enum ConnectionStatus { |
57 CONNECTION_OK, | 57 CONNECTION_OK, |
58 CONNECTION_AUTH_ERROR, | 58 CONNECTION_AUTH_ERROR, |
59 CONNECTION_SERVER_ERROR | 59 CONNECTION_SERVER_ERROR |
60 }; | 60 }; |
61 | 61 |
62 // Contains everything needed to talk to and identify a user account. | 62 // Contains everything needed to talk to and identify a user account. |
63 struct SyncCredentials { | 63 struct SyncCredentials { |
64 std::string email; | 64 std::string email; |
65 std::string sync_token; | 65 std::string sync_token; |
66 base::Time sync_token_time; | |
tim (not reviewing)
2013/05/03 00:46:43
Comments, at least this new field as it's non-obvi
Nicolas Zea
2013/05/03 01:31:41
Done.
| |
66 }; | 67 }; |
67 | 68 |
68 // SyncManager encapsulates syncable::Directory and serves as the parent of all | 69 // SyncManager encapsulates syncable::Directory and serves as the parent of all |
69 // other objects in the sync API. If multiple threads interact with the same | 70 // other objects in the sync API. If multiple threads interact with the same |
70 // local sync repository (i.e. the same sqlite database), they should share a | 71 // local sync repository (i.e. the same sqlite database), they should share a |
71 // single SyncManager instance. The caller should typically create one | 72 // single SyncManager instance. The caller should typically create one |
72 // SyncManager for the lifetime of a user session. | 73 // SyncManager for the lifetime of a user session. |
73 // | 74 // |
74 // Unless stated otherwise, all methods of SyncManager should be called on the | 75 // Unless stated otherwise, all methods of SyncManager should be called on the |
75 // same thread. | 76 // same thread. |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
435 // Returns the SyncManager's encryption handler. | 436 // Returns the SyncManager's encryption handler. |
436 virtual SyncEncryptionHandler* GetEncryptionHandler() = 0; | 437 virtual SyncEncryptionHandler* GetEncryptionHandler() = 0; |
437 | 438 |
438 // Ask the SyncManager to fetch updates for the given types. | 439 // Ask the SyncManager to fetch updates for the given types. |
439 virtual void RefreshTypes(ModelTypeSet types) = 0; | 440 virtual void RefreshTypes(ModelTypeSet types) = 0; |
440 }; | 441 }; |
441 | 442 |
442 } // namespace syncer | 443 } // namespace syncer |
443 | 444 |
444 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ | 445 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ |
OLD | NEW |