| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 class TestProfileSyncService : public ProfileSyncService { | 69 class TestProfileSyncService : public ProfileSyncService { |
| 70 public: | 70 public: |
| 71 // TODO(tim): Add ability to inject TokenService alongside SigninManager. | 71 // TODO(tim): Add ability to inject TokenService alongside SigninManager. |
| 72 // TODO(rogerta): what does above comment mean? | 72 // TODO(rogerta): what does above comment mean? |
| 73 TestProfileSyncService( | 73 TestProfileSyncService( |
| 74 ProfileSyncComponentsFactory* factory, | 74 ProfileSyncComponentsFactory* factory, |
| 75 Profile* profile, | 75 Profile* profile, |
| 76 SigninManagerBase* signin, | 76 SigninManagerBase* signin, |
| 77 ProfileOAuth2TokenService* oauth2_token_service, | 77 ProfileOAuth2TokenService* oauth2_token_service, |
| 78 ProfileSyncService::StartBehavior behavior); | 78 browser_sync::ProfileSyncServiceStartBehavior behavior); |
| 79 | 79 |
| 80 virtual ~TestProfileSyncService(); | 80 virtual ~TestProfileSyncService(); |
| 81 | 81 |
| 82 virtual void OnConfigureDone( | 82 virtual void OnConfigureDone( |
| 83 const browser_sync::DataTypeManager::ConfigureResult& result) OVERRIDE; | 83 const browser_sync::DataTypeManager::ConfigureResult& result) OVERRIDE; |
| 84 | 84 |
| 85 // We implement our own version to avoid some DCHECKs. | 85 // We implement our own version to avoid some DCHECKs. |
| 86 virtual syncer::UserShare* GetUserShare() const OVERRIDE; | 86 virtual syncer::UserShare* GetUserShare() const OVERRIDE; |
| 87 | 87 |
| 88 static TestProfileSyncService* BuildAutoStartAsyncInit( | 88 static TestProfileSyncService* BuildAutoStartAsyncInit( |
| (...skipping 11 matching lines...) Expand all Loading... |
| 100 // js messages on UI loop when it's being destroyed, which are not deleted | 100 // js messages on UI loop when it's being destroyed, which are not deleted |
| 101 // and cause memory leak in test. | 101 // and cause memory leak in test. |
| 102 virtual syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() | 102 virtual syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() |
| 103 OVERRIDE; | 103 OVERRIDE; |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 syncer::TestIdFactory id_factory_; | 106 syncer::TestIdFactory id_factory_; |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 109 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |