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 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 Loading... |
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<invalidation::InvalidatorStorage>& | |
42 invalidator_storage, | |
43 syncer::TestIdFactory& id_factory, | 41 syncer::TestIdFactory& id_factory, |
44 base::Closure& callback, | 42 base::Closure& callback, |
45 bool set_initial_sync_ended_on_init, | 43 bool set_initial_sync_ended_on_init, |
46 bool synchronous_init, | 44 bool synchronous_init, |
47 bool fail_initial_download, | 45 bool fail_initial_download, |
48 syncer::StorageOption storage_option); | 46 syncer::StorageOption storage_option); |
49 virtual ~SyncBackendHostForProfileSyncTest(); | 47 virtual ~SyncBackendHostForProfileSyncTest(); |
50 | 48 |
51 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&)); | 49 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&)); |
52 | 50 |
(...skipping 10 matching lines...) Expand all Loading... |
63 const base::Closure& retry_callback) OVERRIDE; | 61 const base::Closure& retry_callback) OVERRIDE; |
64 | 62 |
65 virtual void HandleSyncManagerInitializationOnFrontendLoop( | 63 virtual void HandleSyncManagerInitializationOnFrontendLoop( |
66 const syncer::WeakHandle<syncer::JsBackend>& js_backend, | 64 const syncer::WeakHandle<syncer::JsBackend>& js_backend, |
67 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 65 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
68 debug_info_listener, | 66 debug_info_listener, |
69 syncer::ModelTypeSet restored_types) OVERRIDE; | 67 syncer::ModelTypeSet restored_types) OVERRIDE; |
70 | 68 |
71 static void SetHistoryServiceExpectations(ProfileMock* profile); | 69 static void SetHistoryServiceExpectations(ProfileMock* profile); |
72 | 70 |
73 void EmitOnInvalidatorStateChange(syncer::InvalidatorState state); | |
74 void EmitOnIncomingInvalidation( | |
75 const syncer::ObjectIdInvalidationMap& invalidation_map); | |
76 | |
77 protected: | 71 protected: |
78 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE; | 72 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE; |
79 | 73 |
80 private: | 74 private: |
81 void ContinueInitialization( | 75 void ContinueInitialization( |
82 const syncer::WeakHandle<syncer::JsBackend>& js_backend, | 76 const syncer::WeakHandle<syncer::JsBackend>& js_backend, |
83 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 77 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
84 debug_info_listener, | 78 debug_info_listener, |
85 syncer::ModelTypeSet restored_types); | 79 syncer::ModelTypeSet restored_types); |
86 | 80 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 bool synchronous_sync_configuration_; | 169 bool synchronous_sync_configuration_; |
176 | 170 |
177 base::Closure callback_; | 171 base::Closure callback_; |
178 bool set_initial_sync_ended_on_init_; | 172 bool set_initial_sync_ended_on_init_; |
179 | 173 |
180 bool fail_initial_download_; | 174 bool fail_initial_download_; |
181 syncer::StorageOption storage_option_; | 175 syncer::StorageOption storage_option_; |
182 }; | 176 }; |
183 | 177 |
184 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 178 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |