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 SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // Returns those types that have been downloaded since the last call to | 47 // Returns those types that have been downloaded since the last call to |
48 // GetAndResetDownloadedTypes(), or since startup if never called. | 48 // GetAndResetDownloadedTypes(), or since startup if never called. |
49 ModelTypeSet GetAndResetDownloadedTypes(); | 49 ModelTypeSet GetAndResetDownloadedTypes(); |
50 | 50 |
51 // Returns those types that have been marked as enabled since the | 51 // Returns those types that have been marked as enabled since the |
52 // last call to GetAndResetEnabledTypes(), or since startup if never | 52 // last call to GetAndResetEnabledTypes(), or since startup if never |
53 // called. | 53 // called. |
54 ModelTypeSet GetAndResetEnabledTypes(); | 54 ModelTypeSet GetAndResetEnabledTypes(); |
55 | 55 |
56 // Posts a method to invalidate the given IDs on the sync thread. | 56 // Posts a method to invalidate the given IDs on the sync thread. |
57 void Invalidate( | 57 void Invalidate(const ObjectIdPayloadMap& id_payloads, |
58 const ObjectIdPayloadMap& id_payloads, | 58 IncomingNotificationSource source); |
59 IncomingNotificationSource source); | |
60 | 59 |
61 // Posts a method to enable notifications on the sync thread. | 60 // Posts a method to enable notifications on the sync thread. |
62 void EnableNotifications(); | 61 void EnableNotifications(); |
63 | 62 |
64 // Posts a method to disable notifications on the sync thread. | 63 // Posts a method to disable notifications on the sync thread. |
65 void DisableNotifications(NotificationsDisabledReason reason); | 64 void DisableNotifications(NotificationsDisabledReason reason); |
66 | 65 |
67 // SyncManager implementation. | 66 // SyncManager implementation. |
68 // Note: we treat whatever message loop this is called from as the sync | 67 // Note: we treat whatever message loop this is called from as the sync |
69 // loop for purposes of callbacks. | 68 // loop for purposes of callbacks. |
(...skipping 19 matching lines...) Expand all Loading... |
89 ReportUnrecoverableErrorFunction | 88 ReportUnrecoverableErrorFunction |
90 report_unrecoverable_error_function) OVERRIDE; | 89 report_unrecoverable_error_function) OVERRIDE; |
91 virtual void ThrowUnrecoverableError() OVERRIDE; | 90 virtual void ThrowUnrecoverableError() OVERRIDE; |
92 virtual ModelTypeSet InitialSyncEndedTypes() OVERRIDE; | 91 virtual ModelTypeSet InitialSyncEndedTypes() OVERRIDE; |
93 virtual ModelTypeSet GetTypesWithEmptyProgressMarkerToken( | 92 virtual ModelTypeSet GetTypesWithEmptyProgressMarkerToken( |
94 ModelTypeSet types) OVERRIDE; | 93 ModelTypeSet types) OVERRIDE; |
95 virtual bool PurgePartiallySyncedTypes() OVERRIDE; | 94 virtual bool PurgePartiallySyncedTypes() OVERRIDE; |
96 virtual void UpdateCredentials(const SyncCredentials& credentials) OVERRIDE; | 95 virtual void UpdateCredentials(const SyncCredentials& credentials) OVERRIDE; |
97 virtual void UpdateEnabledTypes(const ModelTypeSet& types) OVERRIDE; | 96 virtual void UpdateEnabledTypes(const ModelTypeSet& types) OVERRIDE; |
98 virtual void UpdateRegisteredInvalidationIds( | 97 virtual void UpdateRegisteredInvalidationIds( |
99 SyncNotifierObserver* handler, const ObjectIdSet& ids) OVERRIDE; | 98 SyncNotifierObserver* handler, |
| 99 const ObjectIdSet& ids) OVERRIDE; |
100 virtual void StartSyncingNormally( | 100 virtual void StartSyncingNormally( |
101 const ModelSafeRoutingInfo& routing_info) OVERRIDE; | 101 const ModelSafeRoutingInfo& routing_info) OVERRIDE; |
102 virtual void SetEncryptionPassphrase(const std::string& passphrase, | 102 virtual void SetEncryptionPassphrase(const std::string& passphrase, |
103 bool is_explicit) OVERRIDE; | 103 bool is_explicit) OVERRIDE; |
104 virtual void SetDecryptionPassphrase(const std::string& passphrase) OVERRIDE; | 104 virtual void SetDecryptionPassphrase(const std::string& passphrase) OVERRIDE; |
105 virtual void ConfigureSyncer( | 105 virtual void ConfigureSyncer( |
106 ConfigureReason reason, | 106 ConfigureReason reason, |
107 const ModelTypeSet& types_to_config, | 107 const ModelTypeSet& types_to_config, |
108 const ModelSafeRoutingInfo& new_routing_info, | 108 const ModelSafeRoutingInfo& new_routing_info, |
109 const base::Closure& ready_task, | 109 const base::Closure& ready_task, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 // Faked notifier state. | 152 // Faked notifier state. |
153 SyncNotifierHelper notifier_helper_; | 153 SyncNotifierHelper notifier_helper_; |
154 | 154 |
155 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); | 155 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); |
156 }; | 156 }; |
157 | 157 |
158 } // namespace syncer | 158 } // namespace syncer |
159 | 159 |
160 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ | 160 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ |
OLD | NEW |