OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/tools/quic/stateless_rejector.h" | 5 #include "net/tools/quic/stateless_rejector.h" |
6 | 6 |
7 #include "net/quic/core/quic_crypto_server_stream.h" | 7 #include "net/quic/core/quic_crypto_server_stream.h" |
8 #include "net/quic/core/quic_flags.h" | |
9 #include "net/quic/platform/api/quic_bug_tracker.h" | 8 #include "net/quic/platform/api/quic_bug_tracker.h" |
| 9 #include "net/quic/platform/api/quic_flags.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 | 12 |
13 class StatelessRejector::ValidateCallback | 13 class StatelessRejector::ValidateCallback |
14 : public ValidateClientHelloResultCallback { | 14 : public ValidateClientHelloResultCallback { |
15 public: | 15 public: |
16 explicit ValidateCallback( | 16 explicit ValidateCallback( |
17 std::unique_ptr<StatelessRejector> rejector, | 17 std::unique_ptr<StatelessRejector> rejector, |
18 std::unique_ptr<StatelessRejector::ProcessDoneCallback> cb) | 18 std::unique_ptr<StatelessRejector::ProcessDoneCallback> cb) |
19 : rejector_(std::move(rejector)), cb_(std::move(cb)) {} | 19 : rejector_(std::move(rejector)), cb_(std::move(cb)) {} |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 state_ = FAILED; | 150 state_ = FAILED; |
151 } else if (reply_->tag() == kSREJ) { | 151 } else if (reply_->tag() == kSREJ) { |
152 state_ = REJECTED; | 152 state_ = REJECTED; |
153 } else { | 153 } else { |
154 state_ = ACCEPTED; | 154 state_ = ACCEPTED; |
155 } | 155 } |
156 done_cb->Run(std::move(rejector)); | 156 done_cb->Run(std::move(rejector)); |
157 } | 157 } |
158 | 158 |
159 } // namespace net | 159 } // namespace net |
OLD | NEW |