Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: net/quic/crypto/source_address_token.cc

Issue 985383003: QUIC - Initialize SourceAddressToken's timestamp_ in the constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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;
11 11
12 namespace net { 12 namespace net {
13 13
14 SourceAddressToken::SourceAddressToken() 14 SourceAddressToken::SourceAddressToken()
15 : has_cached_network_parameters_(false) { 15 : timestamp_(0), has_cached_network_parameters_(false) {
16 } 16 }
17 17
18 SourceAddressToken::~SourceAddressToken() { 18 SourceAddressToken::~SourceAddressToken() {
19 } 19 }
20 20
21 string SourceAddressToken::SerializeAsString() const { 21 string SourceAddressToken::SerializeAsString() const {
22 string out; 22 string out;
23 out.push_back(static_cast<char>(ip_.size())); 23 out.push_back(static_cast<char>(ip_.size()));
24 out.append(ip_); 24 out.append(ip_);
25 string time_str = base::Int64ToString(timestamp_); 25 string time_str = base::Int64ToString(timestamp_);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 bool SourceAddressTokens::ParseFromArray(const char* plaintext, 78 bool SourceAddressTokens::ParseFromArray(const char* plaintext,
79 size_t plaintext_length) { 79 size_t plaintext_length) {
80 // TODO(rtenneti): Implement parsing of SourceAddressTokens when they are 80 // TODO(rtenneti): Implement parsing of SourceAddressTokens when they are
81 // used. 81 // used.
82 return true; 82 return true;
83 } 83 }
84 84
85 } // namespace net 85 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698