| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/source_address_token.h" | 5 #include "net/quic/crypto/source_address_token.h" |
| 6 | 6 |
| 7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "base/strings/string_split.h" | 8 #include "base/strings/string_split.h" |
| 9 | 9 |
| 10 using std::string; | 10 using std::string; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } | 51 } |
| 52 | 52 |
| 53 ip_.assign(&plaintext[1], ip_len); | 53 ip_.assign(&plaintext[1], ip_len); |
| 54 timestamp_ = timestamp; | 54 timestamp_ = timestamp; |
| 55 | 55 |
| 56 // TODO(rtenneti): Implement parsing of optional CachedNetworkParameters when | 56 // TODO(rtenneti): Implement parsing of optional CachedNetworkParameters when |
| 57 // they are used. | 57 // they are used. |
| 58 return true; | 58 return true; |
| 59 } | 59 } |
| 60 | 60 |
| 61 SourceAddressTokens::SourceAddressTokens() { |
| 62 } |
| 63 |
| 64 SourceAddressTokens::~SourceAddressTokens() { |
| 65 STLDeleteElements(&tokens_); |
| 66 } |
| 67 |
| 68 string SourceAddressTokens::SerializeAsString() const { |
| 69 string out; |
| 70 |
| 71 for (size_t i = 0; i < tokens_size(); i++) { |
| 72 const SourceAddressToken& source_address_token = tokens(i); |
| 73 out.append(source_address_token.SerializeAsString()); |
| 74 } |
| 75 return out; |
| 76 } |
| 77 |
| 78 bool SourceAddressTokens::ParseFromArray(const char* plaintext, |
| 79 size_t plaintext_length) { |
| 80 // TODO(rtenneti): Implement parsing of SourceAddressTokens when they are |
| 81 // used. |
| 82 return true; |
| 83 } |
| 84 |
| 61 } // namespace net | 85 } // namespace net |
| OLD | NEW |