| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_API_MOCK_MODEL_TYPE_STORE_H_ | 5 #ifndef COMPONENTS_SYNC_MODEL_MOCK_MODEL_TYPE_STORE_H_ |
| 6 #define COMPONENTS_SYNC_API_MOCK_MODEL_TYPE_STORE_H_ | 6 #define COMPONENTS_SYNC_MODEL_MOCK_MODEL_TYPE_STORE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "components/sync/api/model_type_store.h" | 12 #include "components/sync/model/model_type_store.h" |
| 13 | 13 |
| 14 namespace syncer { | 14 namespace syncer { |
| 15 | 15 |
| 16 // MockModelTypeStore is implementation of ModelTypeStore that does nothing. | 16 // MockModelTypeStore is implementation of ModelTypeStore that does nothing. |
| 17 // Use it when testing components that depend on ModelTypeStore. | 17 // Use it when testing components that depend on ModelTypeStore. |
| 18 // | 18 // |
| 19 // By default all methods return SUCCESS and empty results. It is possible to | 19 // By default all methods return SUCCESS and empty results. It is possible to |
| 20 // register custom handlers for certain functions to override behavior. It is | 20 // register custom handlers for certain functions to override behavior. It is |
| 21 // responsibility of handler to post callback with result. | 21 // responsibility of handler to post callback with result. |
| 22 // Here is an example: | 22 // Here is an example: |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 WriteRecordSignature write_data_handler_; | 108 WriteRecordSignature write_data_handler_; |
| 109 WriteRecordSignature write_metadata_handler_; | 109 WriteRecordSignature write_metadata_handler_; |
| 110 WriteGlobalMetadataSignature write_global_metadata_handler_; | 110 WriteGlobalMetadataSignature write_global_metadata_handler_; |
| 111 DeleteRecordSignature delete_data_handler_; | 111 DeleteRecordSignature delete_data_handler_; |
| 112 DeleteRecordSignature delete_metadata_handler_; | 112 DeleteRecordSignature delete_metadata_handler_; |
| 113 DeleteGlobalMetadataSignature delete_global_metadata_handler_; | 113 DeleteGlobalMetadataSignature delete_global_metadata_handler_; |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace syncer | 116 } // namespace syncer |
| 117 | 117 |
| 118 #endif // COMPONENTS_SYNC_API_MOCK_MODEL_TYPE_STORE_H_ | 118 #endif // COMPONENTS_SYNC_MODEL_MOCK_MODEL_TYPE_STORE_H_ |
| OLD | NEW |