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

Side by Side Diff: net/quic/crypto/quic_server_info.h

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « net/quic/crypto/quic_crypto_server_config.cc ('k') | net/quic/crypto/source_address_token.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_ 5 #ifndef NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_
6 #define NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_ 6 #define NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 private: 83 private:
84 DISALLOW_COPY_AND_ASSIGN(State); 84 DISALLOW_COPY_AND_ASSIGN(State);
85 }; 85 };
86 86
87 // Once the data is ready, it can be read using the following members. These 87 // Once the data is ready, it can be read using the following members. These
88 // members can then be updated before calling |Persist|. 88 // members can then be updated before calling |Persist|.
89 const State& state() const; 89 const State& state() const;
90 State* mutable_state(); 90 State* mutable_state();
91 91
92 base::TimeTicks wait_for_data_start_time() const {
93 return wait_for_data_start_time_;
94 }
95
96 base::TimeTicks wait_for_data_end_time() const {
97 return wait_for_data_end_time_;
98 }
99
92 protected: 100 protected:
93 // Parse parses pickled data and fills out the public member fields of this 101 // Parse parses pickled data and fills out the public member fields of this
94 // object. It returns true iff the parse was successful. The public member 102 // object. It returns true iff the parse was successful. The public member
95 // fields will be set to something sane in any case. 103 // fields will be set to something sane in any case.
96 bool Parse(const std::string& data); 104 bool Parse(const std::string& data);
97 std::string Serialize(); 105 std::string Serialize();
98 State state_; 106 State state_;
99 107
108 // Time when WaitForDataReady was called and when it has finished.
109 base::TimeTicks wait_for_data_start_time_;
110 base::TimeTicks wait_for_data_end_time_;
111
100 private: 112 private:
101 // ParseInner is a helper function for Parse. 113 // ParseInner is a helper function for Parse.
102 bool ParseInner(const std::string& data); 114 bool ParseInner(const std::string& data);
103 115
104 // SerializeInner is a helper function for Serialize. 116 // SerializeInner is a helper function for Serialize.
105 std::string SerializeInner() const; 117 std::string SerializeInner() const;
106 118
107 // This is the QUIC server (hostname, port, is_https, privacy_mode) tuple for 119 // This is the QUIC server (hostname, port, is_https, privacy_mode) tuple for
108 // which we restore the crypto_config. 120 // which we restore the crypto_config.
109 const QuicServerId server_id_; 121 const QuicServerId server_id_;
110 122
111 DISALLOW_COPY_AND_ASSIGN(QuicServerInfo); 123 DISALLOW_COPY_AND_ASSIGN(QuicServerInfo);
112 }; 124 };
113 125
114 class NET_EXPORT_PRIVATE QuicServerInfoFactory { 126 class NET_EXPORT_PRIVATE QuicServerInfoFactory {
115 public: 127 public:
116 QuicServerInfoFactory() {} 128 QuicServerInfoFactory() {}
117 virtual ~QuicServerInfoFactory(); 129 virtual ~QuicServerInfoFactory();
118 130
119 // GetForServer returns a fresh, allocated QuicServerInfo for the given 131 // GetForServer returns a fresh, allocated QuicServerInfo for the given
120 // |server_id| or NULL on failure. 132 // |server_id| or NULL on failure.
121 virtual QuicServerInfo* GetForServer(const QuicServerId& server_id) = 0; 133 virtual QuicServerInfo* GetForServer(const QuicServerId& server_id) = 0;
122 134
123 DISALLOW_COPY_AND_ASSIGN(QuicServerInfoFactory); 135 DISALLOW_COPY_AND_ASSIGN(QuicServerInfoFactory);
124 }; 136 };
125 137
126 } // namespace net 138 } // namespace net
127 139
128 #endif // NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_ 140 #endif // NET_QUIC_CRYPTO_QUIC_SERVER_INFO_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.cc ('k') | net/quic/crypto/source_address_token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698