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 SYNC_TEST_MOCK_INVALIDATION_H_ | 5 #ifndef COMPONENTS_SYNC_TEST_MOCK_INVALIDATION_H_ |
6 #define SYNC_TEST_MOCK_INVALIDATION_H_ | 6 #define COMPONENTS_SYNC_TEST_MOCK_INVALIDATION_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "sync/internal_api/public/base/invalidation_interface.h" | 13 #include "components/sync/base/invalidation_interface.h" |
14 | 14 |
15 namespace syncer { | 15 namespace syncer { |
16 | 16 |
17 // An InvalidationInterface used by sync for testing. | 17 // An InvalidationInterface used by sync for testing. |
18 // It does not support any form of acknowledgements. | 18 // It does not support any form of acknowledgements. |
19 class MockInvalidation : public InvalidationInterface { | 19 class MockInvalidation : public InvalidationInterface { |
20 public: | 20 public: |
21 // Helpers to build new MockInvalidations. | 21 // Helpers to build new MockInvalidations. |
22 static std::unique_ptr<MockInvalidation> BuildUnknownVersion(); | 22 static std::unique_ptr<MockInvalidation> BuildUnknownVersion(); |
23 static std::unique_ptr<MockInvalidation> Build(int64_t version, | 23 static std::unique_ptr<MockInvalidation> Build(int64_t version, |
(...skipping 18 matching lines...) Expand all Loading... |
42 | 42 |
43 // The version of this invalidation. Valid only if !is_unknown_version_. | 43 // The version of this invalidation. Valid only if !is_unknown_version_. |
44 const int64_t version_; | 44 const int64_t version_; |
45 | 45 |
46 // The payload of this invalidation. Valid only if !is_unknown_version_. | 46 // The payload of this invalidation. Valid only if !is_unknown_version_. |
47 const std::string payload_; | 47 const std::string payload_; |
48 }; | 48 }; |
49 | 49 |
50 } // namespace syncer | 50 } // namespace syncer |
51 | 51 |
52 #endif // SYNC_TEST_MOCK_INVALIDATION_H_ | 52 #endif // COMPONENTS_SYNC_TEST_MOCK_INVALIDATION_H_ |
OLD | NEW |