| 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 28 matching lines...) Expand all Loading... |
| 39 namespace browser_sync { | 39 namespace browser_sync { |
| 40 | 40 |
| 41 class SyncBackendHostForProfileSyncTest : public SyncBackendHost { | 41 class SyncBackendHostForProfileSyncTest : public SyncBackendHost { |
| 42 public: | 42 public: |
| 43 // |synchronous_init| causes initialization to block until the syncapi has | 43 // |synchronous_init| causes initialization to block until the syncapi has |
| 44 // completed setting itself up and called us back. | 44 // completed setting itself up and called us back. |
| 45 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354). | 45 // TOOD(akalin): Remove |synchronous_init| (http://crbug.com/140354). |
| 46 SyncBackendHostForProfileSyncTest( | 46 SyncBackendHostForProfileSyncTest( |
| 47 Profile* profile, | 47 Profile* profile, |
| 48 const base::WeakPtr<SyncPrefs>& sync_prefs, | 48 const base::WeakPtr<SyncPrefs>& sync_prefs, |
| 49 const base::WeakPtr<invalidation::InvalidatorStorage>& | |
| 50 invalidator_storage, | |
| 51 syncer::TestIdFactory& id_factory, | 49 syncer::TestIdFactory& id_factory, |
| 52 base::Closure& callback, | 50 base::Closure& callback, |
| 53 bool set_initial_sync_ended_on_init, | 51 bool set_initial_sync_ended_on_init, |
| 54 bool synchronous_init, | 52 bool synchronous_init, |
| 55 bool fail_initial_download, | 53 bool fail_initial_download, |
| 56 syncer::StorageOption storage_option); | 54 syncer::StorageOption storage_option); |
| 57 virtual ~SyncBackendHostForProfileSyncTest(); | 55 virtual ~SyncBackendHostForProfileSyncTest(); |
| 58 | 56 |
| 59 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&)); | 57 MOCK_METHOD1(RequestNudge, void(const tracked_objects::Location&)); |
| 60 | 58 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 73 const base::Closure& retry_callback) OVERRIDE; | 71 const base::Closure& retry_callback) OVERRIDE; |
| 74 | 72 |
| 75 virtual void HandleSyncManagerInitializationOnFrontendLoop( | 73 virtual void HandleSyncManagerInitializationOnFrontendLoop( |
| 76 const syncer::WeakHandle<syncer::JsBackend>& js_backend, | 74 const syncer::WeakHandle<syncer::JsBackend>& js_backend, |
| 77 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 75 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
| 78 debug_info_listener, | 76 debug_info_listener, |
| 79 syncer::ModelTypeSet restored_types) OVERRIDE; | 77 syncer::ModelTypeSet restored_types) OVERRIDE; |
| 80 | 78 |
| 81 static void SetHistoryServiceExpectations(ProfileMock* profile); | 79 static void SetHistoryServiceExpectations(ProfileMock* profile); |
| 82 | 80 |
| 83 void EmitOnInvalidatorStateChange(syncer::InvalidatorState state); | |
| 84 void EmitOnIncomingInvalidation( | |
| 85 const syncer::ObjectIdInvalidationMap& invalidation_map); | |
| 86 | |
| 87 protected: | 81 protected: |
| 88 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE; | 82 virtual void InitCore(const DoInitializeOptions& options) OVERRIDE; |
| 89 | 83 |
| 90 private: | 84 private: |
| 91 void ContinueInitialization( | 85 void ContinueInitialization( |
| 92 const syncer::WeakHandle<syncer::JsBackend>& js_backend, | 86 const syncer::WeakHandle<syncer::JsBackend>& js_backend, |
| 93 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 87 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
| 94 debug_info_listener, | 88 debug_info_listener, |
| 95 syncer::ModelTypeSet restored_types); | 89 syncer::ModelTypeSet restored_types); |
| 96 | 90 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 197 |
| 204 virtual scoped_ptr<OAuth2TokenService::Request> StartRequest( | 198 virtual scoped_ptr<OAuth2TokenService::Request> StartRequest( |
| 205 const OAuth2TokenService::ScopeSet& scopes, | 199 const OAuth2TokenService::ScopeSet& scopes, |
| 206 OAuth2TokenService::Consumer* consumer) OVERRIDE; | 200 OAuth2TokenService::Consumer* consumer) OVERRIDE; |
| 207 | 201 |
| 208 static BrowserContextKeyedService* BuildTokenService( | 202 static BrowserContextKeyedService* BuildTokenService( |
| 209 content::BrowserContext* context); | 203 content::BrowserContext* context); |
| 210 }; | 204 }; |
| 211 | 205 |
| 212 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 206 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |