[email protected] | 4aea04a | 2010-02-10 20:13:43 | [diff] [blame] | 1 | // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_ |
| 6 | #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_ |
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 7 | #pragma once |
[email protected] | 4aea04a | 2010-02-10 20:13:43 | [diff] [blame] | 8 | |
| 9 | #include <string> |
| 10 | #include "base/string16.h" |
| 11 | #include "chrome/browser/profile.h" |
| 12 | #include "chrome/browser/sync/glue/change_processor.h" |
| 13 | #include "chrome/browser/sync/glue/data_type_controller.h" |
| 14 | #include "chrome/browser/sync/profile_sync_service.h" |
[email protected] | e78d74e | 2010-04-06 22:49:47 | [diff] [blame] | 15 | #include "chrome/browser/sync/syncable/model_type.h" |
[email protected] | 4aea04a | 2010-02-10 20:13:43 | [diff] [blame] | 16 | #include "testing/gmock/include/gmock/gmock.h" |
| 17 | |
| 18 | class ProfileSyncServiceMock : public ProfileSyncService { |
| 19 | public: |
[email protected] | 82d9d295 | 2010-05-15 00:36:16 | [diff] [blame] | 20 | ProfileSyncServiceMock() {} |
[email protected] | 4aea04a | 2010-02-10 20:13:43 | [diff] [blame] | 21 | virtual ~ProfileSyncServiceMock() {} |
| 22 | |
[email protected] | 4aea04a | 2010-02-10 20:13:43 | [diff] [blame] | 23 | MOCK_METHOD0(DisableForUser, void()); |
| 24 | MOCK_METHOD0(OnBackendInitialized, void()); |
| 25 | MOCK_METHOD0(OnSyncCycleCompleted, void()); |
| 26 | MOCK_METHOD0(OnAuthError, void()); |
| 27 | MOCK_METHOD3(OnUserSubmittedAuth, |
| 28 | void(const std::string& username, |
| 29 | const std::string& password, |
| 30 | const std::string& captcha)); |
[email protected] | 4aea04a | 2010-02-10 20:13:43 | [diff] [blame] | 31 | MOCK_METHOD0(OnUserCancelledDialog, void()); |
| 32 | MOCK_CONST_METHOD0(GetAuthenticatedUsername, string16()); |
[email protected] | f6ec8b2 | 2010-06-08 23:40:06 | [diff] [blame] | 33 | MOCK_METHOD2(OnUnrecoverableError, |
| 34 | void(const tracked_objects::Location& location, |
| 35 | const std::string& message)); |
[email protected] | 4aea04a | 2010-02-10 20:13:43 | [diff] [blame] | 36 | MOCK_METHOD2(ActivateDataType, |
| 37 | void(browser_sync::DataTypeController* data_type_controller, |
| 38 | browser_sync::ChangeProcessor* change_processor)); |
| 39 | MOCK_METHOD2(DeactivateDataType, |
| 40 | void(browser_sync::DataTypeController* data_type_controller, |
| 41 | browser_sync::ChangeProcessor* change_processor)); |
| 42 | |
| 43 | MOCK_METHOD0(InitializeBackend, void()); |
[email protected] | 4772b07 | 2010-03-30 17:45:46 | [diff] [blame] | 44 | MOCK_METHOD1(AddObserver, void(Observer*)); |
| 45 | MOCK_METHOD1(RemoveObserver, void(Observer*)); |
| 46 | MOCK_CONST_METHOD0(HasSyncSetupCompleted, bool()); |
[email protected] | e78d74e | 2010-04-06 22:49:47 | [diff] [blame] | 47 | |
| 48 | MOCK_METHOD1(ChangePreferredDataTypes, |
| 49 | void(const syncable::ModelTypeSet& preferred_types)); |
| 50 | MOCK_CONST_METHOD1(GetPreferredDataTypes, |
| 51 | void(syncable::ModelTypeSet* preferred_types)); |
| 52 | MOCK_CONST_METHOD1(GetRegisteredDataTypes, |
| 53 | void(syncable::ModelTypeSet* registered_types)); |
[email protected] | f1e6e021 | 2010-10-15 20:54:24 | [diff] [blame^] | 54 | |
| 55 | MOCK_METHOD0(QueryDetailedSyncStatus, |
| 56 | browser_sync::SyncBackendHost::Status()); |
| 57 | MOCK_CONST_METHOD0(GetLastSyncedTimeString, string16()); |
| 58 | MOCK_CONST_METHOD0(unrecoverable_error_detected, bool()); |
[email protected] | 4aea04a | 2010-02-10 20:13:43 | [diff] [blame] | 59 | }; |
| 60 | |
| 61 | #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_ |