OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_MOCK_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_MOCK_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/sync/api/sync_change.h" |
| 10 #include "chrome/browser/sync/glue/generic_change_processor.h" |
| 11 #include "chrome/browser/sync/unrecoverable_error_handler.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 |
| 14 namespace browser_sync { |
| 15 |
| 16 class GenericChangeProcessorMock : public GenericChangeProcessor, |
| 17 public UnrecoverableErrorHandler{ |
| 18 public: |
| 19 GenericChangeProcessorMock(); |
| 20 |
| 21 MOCK_METHOD2(Connect, void(SyncableService* local_service, |
| 22 sync_api::UserShare* user_share)); |
| 23 MOCK_METHOD0(Disconnect, void()); |
| 24 MOCK_METHOD2(ApplyChangesFromSyncModel, |
| 25 void(const sync_api::BaseTransaction* trans, |
| 26 const sync_api::ImmutableChangeRecordList& changes)); |
| 27 MOCK_METHOD0(CommitChangesFromSyncModel, void()); |
| 28 MOCK_METHOD2(ProcessSyncChanges, |
| 29 SyncError(const tracked_objects::Location& from_here, |
| 30 const SyncChangeList& change_list)); |
| 31 MOCK_METHOD2(GetSyncDataForType, |
| 32 SyncError(syncable::ModelType type, |
| 33 SyncDataList* current_sync_data)); |
| 34 MOCK_METHOD2(SyncModelHasUserCreatedNodes, |
| 35 bool(syncable::ModelType type, |
| 36 bool* has_nodes)); |
| 37 MOCK_METHOD1(CryptoReadyIfNecessary, bool(syncable::ModelType type)); |
| 38 |
| 39 protected: |
| 40 virtual ~GenericChangeProcessorMock(); |
| 41 MOCK_METHOD2(OnUnrecoverableError, void(const tracked_objects::Location&, |
| 42 const std::string&)); |
| 43 |
| 44 // Deprecated methods. |
| 45 MOCK_METHOD1(StartImpl, void(Profile* profile)); |
| 46 MOCK_METHOD0(StopImpl, void()); |
| 47 MOCK_METHOD0(share_handle, sync_api::UserShare*()); |
| 48 |
| 49 private: |
| 50 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessorMock); |
| 51 }; |
| 52 |
| 53 } // namespace browser_sync |
| 54 |
| 55 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_MOCK_H_ |
OLD | NEW |