Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: sync/internal_api/public/test/fake_sync_manager.h

Issue 10837214: Refactor ModelTypePayloadMap and ObjectIdPayloadMap to StateMaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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(const ObjectIdPayloadMap& id_payloads, 57 void Invalidate(const ObjectIdStateMap& id_state_map,
58 IncomingNotificationSource source); 58 IncomingNotificationSource source);
59 59
60 // Posts a method to enable notifications on the sync thread. 60 // Posts a method to enable notifications on the sync thread.
61 void EnableNotifications(); 61 void EnableNotifications();
62 62
63 // Posts a method to disable notifications on the sync thread. 63 // Posts a method to disable notifications on the sync thread.
64 void DisableNotifications(NotificationsDisabledReason reason); 64 void DisableNotifications(NotificationsDisabledReason reason);
65 65
66 // Block until the sync thread has finished processing any pending messages. 66 // Block until the sync thread has finished processing any pending messages.
67 void WaitForSyncThread(); 67 void WaitForSyncThread();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 virtual void SaveChanges() OVERRIDE; 118 virtual void SaveChanges() OVERRIDE;
119 virtual void StopSyncingForShutdown(const base::Closure& callback) OVERRIDE; 119 virtual void StopSyncingForShutdown(const base::Closure& callback) OVERRIDE;
120 virtual void ShutdownOnSyncThread() OVERRIDE; 120 virtual void ShutdownOnSyncThread() OVERRIDE;
121 virtual UserShare* GetUserShare() OVERRIDE; 121 virtual UserShare* GetUserShare() OVERRIDE;
122 virtual bool ReceivedExperiment(Experiments* experiments) OVERRIDE; 122 virtual bool ReceivedExperiment(Experiments* experiments) OVERRIDE;
123 virtual bool HasUnsyncedItems() OVERRIDE; 123 virtual bool HasUnsyncedItems() OVERRIDE;
124 virtual SyncEncryptionHandler* GetEncryptionHandler() OVERRIDE; 124 virtual SyncEncryptionHandler* GetEncryptionHandler() OVERRIDE;
125 125
126 private: 126 private:
127 void InvalidateOnSyncThread( 127 void InvalidateOnSyncThread(
128 const ObjectIdPayloadMap& id_payloads, 128 const ObjectIdStateMap& id_state_map,
129 IncomingNotificationSource source); 129 IncomingNotificationSource source);
130 void EnableNotificationsOnSyncThread(); 130 void EnableNotificationsOnSyncThread();
131 void DisableNotificationsOnSyncThread(NotificationsDisabledReason reason); 131 void DisableNotificationsOnSyncThread(NotificationsDisabledReason reason);
132 132
133 scoped_refptr<base::SequencedTaskRunner> sync_task_runner_; 133 scoped_refptr<base::SequencedTaskRunner> sync_task_runner_;
134 134
135 ObserverList<SyncManager::Observer> observers_; 135 ObserverList<SyncManager::Observer> observers_;
136 136
137 // Faked directory state. 137 // Faked directory state.
138 ModelTypeSet initial_sync_ended_types_; 138 ModelTypeSet initial_sync_ended_types_;
(...skipping 14 matching lines...) Expand all
153 SyncNotifierRegistrar registrar_; 153 SyncNotifierRegistrar registrar_;
154 154
155 scoped_ptr<FakeSyncEncryptionHandler> fake_encryption_handler_; 155 scoped_ptr<FakeSyncEncryptionHandler> fake_encryption_handler_;
156 156
157 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); 157 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager);
158 }; 158 };
159 159
160 } // namespace syncer 160 } // namespace syncer
161 161
162 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ 162 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/sessions/sync_source_info.cc ('k') | sync/internal_api/sync_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698