| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_ | 6 #define COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_ |
| 7 | 7 |
| 8 #include "components/sync_driver/change_processor.h" | 8 #include "components/sync_driver/change_processor.h" |
| 9 #include "sync/internal_api/public/base/model_type.h" | 9 #include "sync/internal_api/public/base/model_type.h" |
| 10 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" | 10 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 12 | 12 |
| 13 namespace browser_sync { | 13 namespace sync_driver { |
| 14 | 14 |
| 15 class ChangeProcessorMock | 15 class ChangeProcessorMock |
| 16 : public ChangeProcessor, public DataTypeErrorHandler{ | 16 : public ChangeProcessor, public DataTypeErrorHandler{ |
| 17 public: | 17 public: |
| 18 ChangeProcessorMock(); | 18 ChangeProcessorMock(); |
| 19 virtual ~ChangeProcessorMock(); | 19 virtual ~ChangeProcessorMock(); |
| 20 MOCK_METHOD3(ApplyChangesFromSyncModel, | 20 MOCK_METHOD3(ApplyChangesFromSyncModel, |
| 21 void(const syncer::BaseTransaction*, int64, | 21 void(const syncer::BaseTransaction*, int64, |
| 22 const syncer::ImmutableChangeRecordList&)); | 22 const syncer::ImmutableChangeRecordList&)); |
| 23 MOCK_METHOD0(CommitChangesFromSyncModel, void()); | 23 MOCK_METHOD0(CommitChangesFromSyncModel, void()); |
| 24 MOCK_METHOD0(StartImpl, void()); | 24 MOCK_METHOD0(StartImpl, void()); |
| 25 MOCK_CONST_METHOD0(IsRunning, bool()); | 25 MOCK_CONST_METHOD0(IsRunning, bool()); |
| 26 MOCK_METHOD2(OnUnrecoverableError, void(const tracked_objects::Location&, | 26 MOCK_METHOD2(OnUnrecoverableError, void(const tracked_objects::Location&, |
| 27 const std::string&)); | 27 const std::string&)); |
| 28 MOCK_METHOD2(OnSingleDatatypeUnrecoverableError, | 28 MOCK_METHOD2(OnSingleDatatypeUnrecoverableError, |
| 29 void(const tracked_objects::Location&, | 29 void(const tracked_objects::Location&, |
| 30 const std::string&)); | 30 const std::string&)); |
| 31 MOCK_METHOD3(CreateAndUploadError, | 31 MOCK_METHOD3(CreateAndUploadError, |
| 32 syncer::SyncError(const tracked_objects::Location&, | 32 syncer::SyncError(const tracked_objects::Location&, |
| 33 const std::string&, | 33 const std::string&, |
| 34 syncer::ModelType)); | 34 syncer::ModelType)); |
| 35 | 35 |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 } // namespace browser_sync | 38 } // namespace sync_driver |
| 39 | 39 |
| 40 #endif // COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_ | 40 #endif // COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_ |
| OLD | NEW |