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

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

Issue 11360259: Sync: Add DeviceInfo's ChangeProcessor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_client.cc Created 8 years, 1 month 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"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "sync/internal_api/public/sync_manager.h" 12 #include "sync/internal_api/public/sync_manager.h"
13 #include "sync/internal_api/public/test/test_user_share.h"
13 #include "sync/notifier/invalidator_registrar.h" 14 #include "sync/notifier/invalidator_registrar.h"
14 15
15 namespace base { 16 namespace base {
16 class SequencedTaskRunner; 17 class SequencedTaskRunner;
17 } 18 }
18 19
19 namespace syncer { 20 namespace syncer {
20 21
21 class FakeSyncEncryptionHandler; 22 class FakeSyncEncryptionHandler;
22 23
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 66
66 // SyncManager implementation. 67 // SyncManager implementation.
67 // Note: we treat whatever message loop this is called from as the sync 68 // Note: we treat whatever message loop this is called from as the sync
68 // loop for purposes of callbacks. 69 // loop for purposes of callbacks.
69 virtual void Init( 70 virtual void Init(
70 const FilePath& database_location, 71 const FilePath& database_location,
71 const WeakHandle<JsEventHandler>& event_handler, 72 const WeakHandle<JsEventHandler>& event_handler,
72 const std::string& sync_server_and_path, 73 const std::string& sync_server_and_path,
73 int sync_server_port, 74 int sync_server_port,
74 bool use_ssl, 75 bool use_ssl,
75 const scoped_refptr<base::TaskRunner>& blocking_task_runner,
76 scoped_ptr<HttpPostProviderFactory> post_factory, 76 scoped_ptr<HttpPostProviderFactory> post_factory,
77 const std::vector<ModelSafeWorker*>& workers, 77 const std::vector<ModelSafeWorker*>& workers,
78 ExtensionsActivityMonitor* extensions_activity_monitor, 78 ExtensionsActivityMonitor* extensions_activity_monitor,
79 ChangeDelegate* change_delegate, 79 ChangeDelegate* change_delegate,
80 const SyncCredentials& credentials, 80 const SyncCredentials& credentials,
81 scoped_ptr<Invalidator> invalidator, 81 scoped_ptr<Invalidator> invalidator,
82 const std::string& restored_key_for_bootstrapping, 82 const std::string& restored_key_for_bootstrapping,
83 const std::string& restored_keystore_key_for_bootstrapping, 83 const std::string& restored_keystore_key_for_bootstrapping,
84 scoped_ptr<InternalComponentsFactory> internal_components_factory, 84 scoped_ptr<InternalComponentsFactory> internal_components_factory,
85 Encryptor* encryptor, 85 Encryptor* encryptor,
(...skipping 22 matching lines...) Expand all
108 const ModelSafeRoutingInfo& new_routing_info, 108 const ModelSafeRoutingInfo& new_routing_info,
109 const base::Closure& ready_task, 109 const base::Closure& ready_task,
110 const base::Closure& retry_task) OVERRIDE; 110 const base::Closure& retry_task) OVERRIDE;
111 virtual void AddObserver(Observer* observer) OVERRIDE; 111 virtual void AddObserver(Observer* observer) OVERRIDE;
112 virtual void RemoveObserver(Observer* observer) OVERRIDE; 112 virtual void RemoveObserver(Observer* observer) OVERRIDE;
113 virtual SyncStatus GetDetailedStatus() const OVERRIDE; 113 virtual SyncStatus GetDetailedStatus() const OVERRIDE;
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 const std::string cache_guid() OVERRIDE;
118 virtual bool ReceivedExperiment(Experiments* experiments) OVERRIDE; 119 virtual bool ReceivedExperiment(Experiments* experiments) OVERRIDE;
119 virtual bool HasUnsyncedItems() OVERRIDE; 120 virtual bool HasUnsyncedItems() OVERRIDE;
120 virtual SyncEncryptionHandler* GetEncryptionHandler() OVERRIDE; 121 virtual SyncEncryptionHandler* GetEncryptionHandler() OVERRIDE;
121 122
122 private: 123 private:
123 void InvalidateOnSyncThread( 124 void InvalidateOnSyncThread(
124 const ObjectIdInvalidationMap& invalidation_map, 125 const ObjectIdInvalidationMap& invalidation_map,
125 IncomingInvalidationSource source); 126 IncomingInvalidationSource source);
126 void UpdateInvalidatorStateOnSyncThread(InvalidatorState state); 127 void UpdateInvalidatorStateOnSyncThread(InvalidatorState state);
127 128
(...skipping 14 matching lines...) Expand all
142 // The set of types that have been downloaded. 143 // The set of types that have been downloaded.
143 ModelTypeSet downloaded_types_; 144 ModelTypeSet downloaded_types_;
144 // The set of types that have been enabled. 145 // The set of types that have been enabled.
145 ModelTypeSet enabled_types_; 146 ModelTypeSet enabled_types_;
146 147
147 // Faked invalidator state. 148 // Faked invalidator state.
148 InvalidatorRegistrar registrar_; 149 InvalidatorRegistrar registrar_;
149 150
150 scoped_ptr<FakeSyncEncryptionHandler> fake_encryption_handler_; 151 scoped_ptr<FakeSyncEncryptionHandler> fake_encryption_handler_;
151 152
153 TestUserShare test_user_share_;
154
152 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); 155 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager);
153 }; 156 };
154 157
155 } // namespace syncer 158 } // namespace syncer
156 159
157 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ 160 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/sync_manager.h ('k') | sync/internal_api/public/test/test_user_share.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698