| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "net/quic/crypto/local_strike_register_client.h" | 5 #include "net/quic/crypto/local_strike_register_client.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 bool* saved_value, | 29 bool* saved_value, |
| 30 InsertStatus* saved_nonce_error) | 30 InsertStatus* saved_nonce_error) |
| 31 : called_(called), | 31 : called_(called), |
| 32 saved_value_(saved_value), | 32 saved_value_(saved_value), |
| 33 saved_nonce_error_(saved_nonce_error) { | 33 saved_nonce_error_(saved_nonce_error) { |
| 34 *called_ = false; | 34 *called_ = false; |
| 35 } | 35 } |
| 36 | 36 |
| 37 protected: | 37 protected: |
| 38 virtual void RunImpl(bool nonce_is_valid_and_unique, | 38 virtual void RunImpl(bool nonce_is_valid_and_unique, |
| 39 InsertStatus nonce_error) OVERRIDE { | 39 InsertStatus nonce_error) override { |
| 40 *called_ = true; | 40 *called_ = true; |
| 41 *saved_value_ = nonce_is_valid_and_unique; | 41 *saved_value_ = nonce_is_valid_and_unique; |
| 42 *saved_nonce_error_ = nonce_error; | 42 *saved_nonce_error_ = nonce_error; |
| 43 } | 43 } |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 bool* called_; | 46 bool* called_; |
| 47 bool* saved_value_; | 47 bool* saved_value_; |
| 48 InsertStatus* saved_nonce_error_; | 48 InsertStatus* saved_nonce_error_; |
| 49 | 49 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 new RecordResultCallback(&called, &is_valid, &nonce_error)); | 129 new RecordResultCallback(&called, &is_valid, &nonce_error)); |
| 130 EXPECT_TRUE(called); | 130 EXPECT_TRUE(called); |
| 131 EXPECT_TRUE(is_valid); | 131 EXPECT_TRUE(is_valid); |
| 132 EXPECT_EQ(NONCE_OK, nonce_error); | 132 EXPECT_EQ(NONCE_OK, nonce_error); |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace | 136 } // namespace |
| 137 } // namespace test | 137 } // namespace test |
| 138 } // namespace net | 138 } // namespace net |
| OLD | NEW |