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

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

Issue 11052007: Rename ModelType/ObjectIdStateMap to InvalidationMap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 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 ObjectIdStateMap& id_state_map, 57 void Invalidate(const ObjectIdInvalidationMap& invalidation_map,
58 IncomingInvalidationSource source); 58 IncomingInvalidationSource source);
59 59
60 // Posts a method to update the invalidator state on the sync thread. 60 // Posts a method to update the invalidator state on the sync thread.
61 void UpdateInvalidatorState(InvalidatorState state); 61 void UpdateInvalidatorState(InvalidatorState state);
62 62
63 // Block until the sync thread has finished processing any pending messages. 63 // Block until the sync thread has finished processing any pending messages.
64 void WaitForSyncThread(); 64 void WaitForSyncThread();
65 65
66 // SyncManager implementation. 66 // SyncManager implementation.
67 // 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
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 virtual void SaveChanges() OVERRIDE; 114 virtual void SaveChanges() OVERRIDE;
115 virtual void StopSyncingForShutdown(const base::Closure& callback) OVERRIDE; 115 virtual void StopSyncingForShutdown(const base::Closure& callback) OVERRIDE;
116 virtual void ShutdownOnSyncThread() OVERRIDE; 116 virtual void ShutdownOnSyncThread() OVERRIDE;
117 virtual UserShare* GetUserShare() OVERRIDE; 117 virtual UserShare* GetUserShare() OVERRIDE;
118 virtual bool ReceivedExperiment(Experiments* experiments) OVERRIDE; 118 virtual bool ReceivedExperiment(Experiments* experiments) OVERRIDE;
119 virtual bool HasUnsyncedItems() OVERRIDE; 119 virtual bool HasUnsyncedItems() OVERRIDE;
120 virtual SyncEncryptionHandler* GetEncryptionHandler() OVERRIDE; 120 virtual SyncEncryptionHandler* GetEncryptionHandler() OVERRIDE;
121 121
122 private: 122 private:
123 void InvalidateOnSyncThread( 123 void InvalidateOnSyncThread(
124 const ObjectIdStateMap& id_state_map, 124 const ObjectIdInvalidationMap& invalidation_map,
125 IncomingInvalidationSource source); 125 IncomingInvalidationSource source);
126 void UpdateInvalidatorStateOnSyncThread(InvalidatorState state); 126 void UpdateInvalidatorStateOnSyncThread(InvalidatorState state);
127 127
128 scoped_refptr<base::SequencedTaskRunner> sync_task_runner_; 128 scoped_refptr<base::SequencedTaskRunner> sync_task_runner_;
129 129
130 ObserverList<SyncManager::Observer> observers_; 130 ObserverList<SyncManager::Observer> observers_;
131 131
132 // Faked directory state. 132 // Faked directory state.
133 ModelTypeSet initial_sync_ended_types_; 133 ModelTypeSet initial_sync_ended_types_;
134 ModelTypeSet progress_marker_types_; 134 ModelTypeSet progress_marker_types_;
(...skipping 13 matching lines...) Expand all
148 InvalidatorRegistrar registrar_; 148 InvalidatorRegistrar registrar_;
149 149
150 scoped_ptr<FakeSyncEncryptionHandler> fake_encryption_handler_; 150 scoped_ptr<FakeSyncEncryptionHandler> fake_encryption_handler_;
151 151
152 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); 152 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager);
153 }; 153 };
154 154
155 } // namespace syncer 155 } // namespace syncer
156 156
157 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ 157 #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