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 COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 | 562 |
563 // Sometimes we need to wait for tasks on the sync thread in tests. | 563 // Sometimes we need to wait for tasks on the sync thread in tests. |
564 base::MessageLoop* GetSyncLoopForTest() const; | 564 base::MessageLoop* GetSyncLoopForTest() const; |
565 | 565 |
566 // Some tests rely on injecting calls to the encryption observer. | 566 // Some tests rely on injecting calls to the encryption observer. |
567 syncer::SyncEncryptionHandler::Observer* GetEncryptionObserverForTest() const; | 567 syncer::SyncEncryptionHandler::Observer* GetEncryptionObserverForTest() const; |
568 | 568 |
569 // Triggers sync cycle with request to update specified |types|. | 569 // Triggers sync cycle with request to update specified |types|. |
570 void RefreshTypesForTest(syncer::ModelTypeSet types); | 570 void RefreshTypesForTest(syncer::ModelTypeSet types); |
571 | 571 |
| 572 // Calls sync engine to send ClearServerDataMessage to server. This is used |
| 573 // to start accounts with a clean slate when performing end to end testing. |
| 574 void ClearServerDataForTest(const base::Closure& callback); |
| 575 |
572 protected: | 576 protected: |
573 // SyncServiceBase implementation. | 577 // SyncServiceBase implementation. |
574 syncer::SyncCredentials GetCredentials() override; | 578 syncer::SyncCredentials GetCredentials() override; |
575 syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() override; | 579 syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() override; |
576 syncer::SyncEngine::HttpPostProviderFactoryGetter | 580 syncer::SyncEngine::HttpPostProviderFactoryGetter |
577 MakeHttpPostProviderFactoryGetter() override; | 581 MakeHttpPostProviderFactoryGetter() override; |
578 syncer::WeakHandle<syncer::UnrecoverableErrorHandler> | 582 syncer::WeakHandle<syncer::UnrecoverableErrorHandler> |
579 GetUnrecoverableErrorHandler() override; | 583 GetUnrecoverableErrorHandler() override; |
580 | 584 |
581 private: | 585 private: |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 base::WeakPtrFactory<ProfileSyncService> weak_factory_; | 896 base::WeakPtrFactory<ProfileSyncService> weak_factory_; |
893 | 897 |
894 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 898 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
895 }; | 899 }; |
896 | 900 |
897 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); | 901 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error); |
898 | 902 |
899 } // namespace browser_sync | 903 } // namespace browser_sync |
900 | 904 |
901 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 905 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |