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 #include <stddef.h> |
| 6 |
5 #include "components/proximity_auth/fake_secure_context.h" | 7 #include "components/proximity_auth/fake_secure_context.h" |
6 | 8 |
7 namespace proximity_auth { | 9 namespace proximity_auth { |
8 | 10 |
9 namespace { | 11 namespace { |
10 const char kFakeEncodingSuffix[] = ", but encoded"; | 12 const char kFakeEncodingSuffix[] = ", but encoded"; |
11 const char kChannelBindingData[] = "channel binding data"; | 13 const char kChannelBindingData[] = "channel binding data"; |
12 } // namespace | 14 } // namespace |
13 | 15 |
14 FakeSecureContext::FakeSecureContext() | 16 FakeSecureContext::FakeSecureContext() |
(...skipping 22 matching lines...) Expand all Loading... |
37 kFakeEncodingSuffix) { | 39 kFakeEncodingSuffix) { |
38 callback.Run(std::string()); | 40 callback.Run(std::string()); |
39 } | 41 } |
40 | 42 |
41 std::string decoded_message = encoded_message; | 43 std::string decoded_message = encoded_message; |
42 decoded_message.erase(decoded_message.rfind(kFakeEncodingSuffix)); | 44 decoded_message.erase(decoded_message.rfind(kFakeEncodingSuffix)); |
43 callback.Run(decoded_message); | 45 callback.Run(decoded_message); |
44 } | 46 } |
45 | 47 |
46 } // namespace proximity_auth | 48 } // namespace proximity_auth |
OLD | NEW |