| 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 25 matching lines...) Expand all Loading... |
| 36 namespace browser_sync { | 36 namespace browser_sync { |
| 37 | 37 |
| 38 class SyncBackendHostForProfileSyncTest : public SyncBackendHost { | 38 class SyncBackendHostForProfileSyncTest : public SyncBackendHost { |
| 39 public: | 39 public: |
| 40 // |synchronous_init| causes initialization to block until the syncapi has | 40 // |synchronous_init| causes initialization to block until the syncapi has |
| 41 // completed setting itself up and called us back. | 41 // completed setting itself up and called us back. |
| 42 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354). | 42 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354). |
| 43 SyncBackendHostForProfileSyncTest( | 43 SyncBackendHostForProfileSyncTest( |
| 44 Profile* profile, | 44 Profile* profile, |
| 45 const base::WeakPtr<SyncPrefs>& sync_prefs, | 45 const base::WeakPtr<SyncPrefs>& sync_prefs, |
| 46 const base::WeakPtr<invalidation::InvalidatorStorage>& | |
| 47 invalidator_storage, | |
| 48 syncer::TestIdFactory& id_factory, | 46 syncer::TestIdFactory& id_factory, |
| 49 base::Closure& callback, | 47 base::Closure& callback, |
| 50 bool set_initial_sync_ended_on_init, | 48 bool set_initial_sync_ended_on_init, |
| 51 bool synchronous_init, | 49 bool synchronous_init, |
| 52 bool fail_initial_download, | 50 bool fail_initial_download, |
| 53 syncer::StorageOption storage_option); | 51 syncer::StorageOption storage_option); |
| 54 virtual ~SyncBackendHostForProfileSyncTest(); | 52 virtual ~SyncBackendHostForProfileSyncTest(); |
| 55 | 53 |
| 56 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&)); | 54 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&)); |
| 57 | 55 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 68 const base::Closure& retry_callback) OVERRIDE; | 66 const base::Closure& retry_callback) OVERRIDE; |
| 69 | 67 |
| 70 virtual void HandleSyncManagerInitializationOnFrontendLoop( | 68 virtual void HandleSyncManagerInitializationOnFrontendLoop( |
| 71 const syncer::WeakHandle<syncer::JsBackend>& js_backend, | 69 const syncer::WeakHandle<syncer::JsBackend>& js_backend, |
| 72 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 70 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
| 73 debug_info_listener, | 71 debug_info_listener, |
| 74 syncer::ModelTypeSet restored_types) OVERRIDE; | 72 syncer::ModelTypeSet restored_types) OVERRIDE; |
| 75 | 73 |
| 76 static void SetHistoryServiceExpectations(ProfileMock* profile); | 74 static void SetHistoryServiceExpectations(ProfileMock* profile); |
| 77 | 75 |
| 78 void EmitOnInvalidatorStateChange(syncer::InvalidatorState state); | |
| 79 void EmitOnIncomingInvalidation( | |
| 80 const syncer::ObjectIdInvalidationMap& invalidation_map); | |
| 81 | |
| 82 protected: | 76 protected: |
| 83 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE; | 77 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE; |
| 84 | 78 |
| 85 private: | 79 private: |
| 86 void ContinueInitialization( | 80 void ContinueInitialization( |
| 87 const syncer::WeakHandle<syncer::JsBackend>& js_backend, | 81 const syncer::WeakHandle<syncer::JsBackend>& js_backend, |
| 88 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 82 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
| 89 debug_info_listener, | 83 debug_info_listener, |
| 90 syncer::ModelTypeSet restored_types); | 84 syncer::ModelTypeSet restored_types); |
| 91 | 85 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 bool synchronous_sync_configuration_; | 174 bool synchronous_sync_configuration_; |
| 181 | 175 |
| 182 base::Closure callback_; | 176 base::Closure callback_; |
| 183 bool set_initial_sync_ended_on_init_; | 177 bool set_initial_sync_ended_on_init_; |
| 184 | 178 |
| 185 bool fail_initial_download_; | 179 bool fail_initial_download_; |
| 186 syncer::StorageOption storage_option_; | 180 syncer::StorageOption storage_option_; |
| 187 }; | 181 }; |
| 188 | 182 |
| 189 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 183 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |