| 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" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "chrome/browser/signin/profile_oauth2_token_service.h" | 13 #include "chrome/browser/signin/profile_oauth2_token_service.h" |
| 14 #include "chrome/browser/sync/glue/data_type_manager_impl.h" | 14 #include "chrome/browser/sync/glue/data_type_manager_impl.h" |
| 15 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" | 15 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" |
| 16 #include "chrome/browser/sync/profile_sync_service.h" | 16 #include "chrome/browser/sync/profile_sync_service.h" |
| 17 #include "chrome/browser/sync/sync_prefs.h" | 17 #include "components/sync_driver/sync_prefs.h" |
| 18 #include "sync/test/engine/test_id_factory.h" | 18 #include "sync/test/engine/test_id_factory.h" |
| 19 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
| 20 | 20 |
| 21 class Profile; | 21 class Profile; |
| 22 class ProfileOAuth2TokenService; | 22 class ProfileOAuth2TokenService; |
| 23 class ProfileSyncComponentsFactory; | 23 class ProfileSyncComponentsFactory; |
| 24 class ProfileSyncComponentsFactoryMock; | 24 class ProfileSyncComponentsFactoryMock; |
| 25 | 25 |
| 26 ACTION(ReturnNewDataTypeManager) { | 26 ACTION(ReturnNewDataTypeManager) { |
| 27 return new browser_sync::DataTypeManagerImpl(arg0, | 27 return new browser_sync::DataTypeManagerImpl(arg0, |
| 28 arg1, | 28 arg1, |
| 29 arg2, | 29 arg2, |
| 30 arg3, | 30 arg3, |
| 31 arg4, | 31 arg4, |
| 32 arg5); | 32 arg5); |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace browser_sync { | 35 namespace browser_sync { |
| 36 | 36 |
| 37 class SyncBackendHostForProfileSyncTest : public SyncBackendHostImpl { | 37 class SyncBackendHostForProfileSyncTest : public SyncBackendHostImpl { |
| 38 public: | 38 public: |
| 39 SyncBackendHostForProfileSyncTest( | 39 SyncBackendHostForProfileSyncTest( |
| 40 Profile* profile, | 40 Profile* profile, |
| 41 const base::WeakPtr<SyncPrefs>& sync_prefs, | 41 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, |
| 42 base::Closure callback); | 42 base::Closure callback); |
| 43 virtual ~SyncBackendHostForProfileSyncTest(); | 43 virtual ~SyncBackendHostForProfileSyncTest(); |
| 44 | 44 |
| 45 virtual void RequestConfigureSyncer( | 45 virtual void RequestConfigureSyncer( |
| 46 syncer::ConfigureReason reason, | 46 syncer::ConfigureReason reason, |
| 47 syncer::ModelTypeSet to_download, | 47 syncer::ModelTypeSet to_download, |
| 48 syncer::ModelTypeSet to_purge, | 48 syncer::ModelTypeSet to_purge, |
| 49 syncer::ModelTypeSet to_journal, | 49 syncer::ModelTypeSet to_journal, |
| 50 syncer::ModelTypeSet to_unapply, | 50 syncer::ModelTypeSet to_unapply, |
| 51 syncer::ModelTypeSet to_ignore, | 51 syncer::ModelTypeSet to_ignore, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // js messages on UI loop when it's being destroyed, which are not deleted | 99 // js messages on UI loop when it's being destroyed, which are not deleted |
| 100 // and cause memory leak in test. | 100 // and cause memory leak in test. |
| 101 virtual syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() | 101 virtual syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() |
| 102 OVERRIDE; | 102 OVERRIDE; |
| 103 | 103 |
| 104 private: | 104 private: |
| 105 syncer::TestIdFactory id_factory_; | 105 syncer::TestIdFactory id_factory_; |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 108 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |