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

Side by Side Diff: chrome/browser/sync/test_profile_sync_service.h

Issue 13197004: Draft: InvalidationService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Passes tests Created 7 years, 8 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 CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 20 matching lines...) Expand all
31 namespace browser_sync { 31 namespace browser_sync {
32 32
33 class SyncBackendHostForProfileSyncTest : public SyncBackendHost { 33 class SyncBackendHostForProfileSyncTest : public SyncBackendHost {
34 public: 34 public:
35 // |synchronous_init| causes initialization to block until the syncapi has 35 // |synchronous_init| causes initialization to block until the syncapi has
36 // completed setting itself up and called us back. 36 // completed setting itself up and called us back.
37 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354). 37 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354).
38 SyncBackendHostForProfileSyncTest( 38 SyncBackendHostForProfileSyncTest(
39 Profile* profile, 39 Profile* profile,
40 const base::WeakPtr<SyncPrefs>& sync_prefs, 40 const base::WeakPtr<SyncPrefs>& sync_prefs,
41 const base::WeakPtr<InvalidatorStorage>& invalidator_storage,
42 syncer::TestIdFactory& id_factory, 41 syncer::TestIdFactory& id_factory,
43 base::Closure& callback, 42 base::Closure& callback,
44 bool set_initial_sync_ended_on_init, 43 bool set_initial_sync_ended_on_init,
45 bool synchronous_init, 44 bool synchronous_init,
46 bool fail_initial_download, 45 bool fail_initial_download,
47 syncer::StorageOption storage_option); 46 syncer::StorageOption storage_option);
48 virtual ~SyncBackendHostForProfileSyncTest(); 47 virtual ~SyncBackendHostForProfileSyncTest();
49 48
50 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&)); 49 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&));
51 50
52 virtual void UpdateCredentials( 51 virtual void UpdateCredentials(
53 const syncer::SyncCredentials& credentials) OVERRIDE; 52 const syncer::SyncCredentials& credentials) OVERRIDE;
54 53
55 virtual void RequestConfigureSyncer( 54 virtual void RequestConfigureSyncer(
56 syncer::ConfigureReason reason, 55 syncer::ConfigureReason reason,
57 syncer::ModelTypeSet types_to_config, 56 syncer::ModelTypeSet types_to_config,
58 syncer::ModelTypeSet failed_types, 57 syncer::ModelTypeSet failed_types,
59 const syncer::ModelSafeRoutingInfo& routing_info, 58 const syncer::ModelSafeRoutingInfo& routing_info,
60 const base::Callback<void(syncer::ModelTypeSet)>& ready_task, 59 const base::Callback<void(syncer::ModelTypeSet)>& ready_task,
61 const base::Closure& retry_callback) OVERRIDE; 60 const base::Closure& retry_callback) OVERRIDE;
62 61
63 virtual void HandleSyncManagerInitializationOnFrontendLoop( 62 virtual void HandleSyncManagerInitializationOnFrontendLoop(
64 const syncer::WeakHandle<syncer::JsBackend>& js_backend, 63 const syncer::WeakHandle<syncer::JsBackend>& js_backend,
65 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 64 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
66 debug_info_listener, 65 debug_info_listener,
67 syncer::ModelTypeSet restored_types) OVERRIDE; 66 syncer::ModelTypeSet restored_types) OVERRIDE;
68 67
69 static void SetHistoryServiceExpectations(ProfileMock* profile); 68 static void SetHistoryServiceExpectations(ProfileMock* profile);
70 69
71 void EmitOnInvalidatorStateChange(syncer::InvalidatorState state);
72 void EmitOnIncomingInvalidation(
73 const syncer::ObjectIdInvalidationMap& invalidation_map);
74
75 protected: 70 protected:
76 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE; 71 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE;
77 72
78 private: 73 private:
79 void ContinueInitialization( 74 void ContinueInitialization(
80 const syncer::WeakHandle<syncer::JsBackend>& js_backend, 75 const syncer::WeakHandle<syncer::JsBackend>& js_backend,
81 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 76 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
82 debug_info_listener, 77 debug_info_listener,
83 syncer::ModelTypeSet restored_types); 78 syncer::ModelTypeSet restored_types);
84 79
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 bool synchronous_sync_configuration_; 167 bool synchronous_sync_configuration_;
173 168
174 base::Closure callback_; 169 base::Closure callback_;
175 bool set_initial_sync_ended_on_init_; 170 bool set_initial_sync_ended_on_init_;
176 171
177 bool fail_initial_download_; 172 bool fail_initial_download_;
178 syncer::StorageOption storage_option_; 173 syncer::StorageOption storage_option_;
179 }; 174 };
180 175
181 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 176 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698