| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROFILE_SYNC_SERVICE_MOCK_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_ |
| 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/string16.h" | 12 #include "base/string16.h" |
| 13 #include "chrome/browser/sync/glue/change_processor.h" | 13 #include "chrome/browser/sync/glue/change_processor.h" |
| 14 #include "chrome/browser/sync/glue/data_type_controller.h" | 14 #include "chrome/browser/sync/glue/data_type_controller.h" |
| 15 #include "chrome/browser/sync/profile_sync_service.h" | 15 #include "chrome/browser/sync/profile_sync_service.h" |
| 16 #include "chrome/browser/sync/protocol/sync_protocol_error.h" | 16 #include "chrome/browser/sync/protocol/sync_protocol_error.h" |
| 17 #include "chrome/browser/sync/syncable/model_type.h" | 17 #include "chrome/browser/sync/syncable/model_type.h" |
| 18 #include "chrome/common/net/gaia/google_service_auth_error.h" | |
| 19 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
| 20 | 19 |
| 21 class ProfileSyncServiceMock : public ProfileSyncService { | 20 class ProfileSyncServiceMock : public ProfileSyncService { |
| 22 public: | 21 public: |
| 23 ProfileSyncServiceMock(); | 22 ProfileSyncServiceMock(); |
| 24 virtual ~ProfileSyncServiceMock(); | 23 virtual ~ProfileSyncServiceMock(); |
| 25 | 24 |
| 26 MOCK_METHOD0(DisableForUser, void()); | 25 MOCK_METHOD0(DisableForUser, void()); |
| 27 MOCK_METHOD2(OnBackendInitialized, | 26 MOCK_METHOD2(OnBackendInitialized, |
| 28 void(const browser_sync::WeakHandle<browser_sync::JsBackend>&, | 27 void(const browser_sync::WeakHandle<browser_sync::JsBackend>&, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 53 | 52 |
| 54 MOCK_METHOD1(ChangePreferredDataTypes, | 53 MOCK_METHOD1(ChangePreferredDataTypes, |
| 55 void(const syncable::ModelTypeSet& preferred_types)); | 54 void(const syncable::ModelTypeSet& preferred_types)); |
| 56 MOCK_CONST_METHOD1(GetPreferredDataTypes, | 55 MOCK_CONST_METHOD1(GetPreferredDataTypes, |
| 57 void(syncable::ModelTypeSet* preferred_types)); | 56 void(syncable::ModelTypeSet* preferred_types)); |
| 58 MOCK_CONST_METHOD1(GetRegisteredDataTypes, | 57 MOCK_CONST_METHOD1(GetRegisteredDataTypes, |
| 59 void(syncable::ModelTypeSet* registered_types)); | 58 void(syncable::ModelTypeSet* registered_types)); |
| 60 MOCK_CONST_METHOD0(GetLastSessionSnapshot, | 59 MOCK_CONST_METHOD0(GetLastSessionSnapshot, |
| 61 const browser_sync::sessions::SyncSessionSnapshot*()); | 60 const browser_sync::sessions::SyncSessionSnapshot*()); |
| 62 | 61 |
| 63 MOCK_CONST_METHOD0(UIShouldDepictAuthInProgress, bool()); | |
| 64 MOCK_METHOD0(QueryDetailedSyncStatus, | 62 MOCK_METHOD0(QueryDetailedSyncStatus, |
| 65 browser_sync::SyncBackendHost::Status()); | 63 browser_sync::SyncBackendHost::Status()); |
| 66 MOCK_CONST_METHOD0(GetAuthError, const GoogleServiceAuthError&()); | |
| 67 MOCK_CONST_METHOD0(SetupInProgress, bool()); | |
| 68 MOCK_CONST_METHOD0(GetLastSyncedTimeString, string16()); | 64 MOCK_CONST_METHOD0(GetLastSyncedTimeString, string16()); |
| 69 MOCK_CONST_METHOD0(unrecoverable_error_detected, bool()); | 65 MOCK_CONST_METHOD0(unrecoverable_error_detected, bool()); |
| 70 MOCK_METHOD1(OnActionableError, void( | 66 MOCK_METHOD1(OnActionableError, void( |
| 71 const browser_sync::SyncProtocolError&)); | 67 const browser_sync::SyncProtocolError&)); |
| 72 | 68 |
| 73 MOCK_CONST_METHOD0(IsPassphraseRequired, bool()); | 69 MOCK_CONST_METHOD0(IsPassphraseRequired, bool()); |
| 74 MOCK_CONST_METHOD0(IsPassphraseRequiredForDecryption, bool()); | 70 MOCK_CONST_METHOD0(IsPassphraseRequiredForDecryption, bool()); |
| 75 | 71 |
| 76 MOCK_METHOD0(ShowErrorUI, void()); | 72 MOCK_METHOD0(ShowErrorUI, void()); |
| 77 }; | 73 }; |
| 78 | 74 |
| 79 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_ | 75 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_ |
| OLD | NEW |