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

Side by Side Diff: net/dns/dns_session.h

Issue 1898033006: DNS: Add stubs for persisting data across restarts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: *silently glares at editor, reuploads with proper spacing* Created 4 years, 4 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 | « net/dns/dns_client.cc ('k') | net/dns/dns_session.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DNS_DNS_SESSION_H_ 5 #ifndef NET_DNS_DNS_SESSION_H_
6 #define NET_DNS_DNS_SESSION_H_ 6 #define NET_DNS_DNS_SESSION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Allocate a socket, already connected to the server address. 103 // Allocate a socket, already connected to the server address.
104 // When the SocketLease is destroyed, the socket will be freed. 104 // When the SocketLease is destroyed, the socket will be freed.
105 std::unique_ptr<SocketLease> AllocateSocket(unsigned server_index, 105 std::unique_ptr<SocketLease> AllocateSocket(unsigned server_index,
106 const NetLog::Source& source); 106 const NetLog::Source& source);
107 107
108 // Creates a StreamSocket from the factory for a transaction over TCP. These 108 // Creates a StreamSocket from the factory for a transaction over TCP. These
109 // sockets are not pooled. 109 // sockets are not pooled.
110 std::unique_ptr<StreamSocket> CreateTCPSocket(unsigned server_index, 110 std::unique_ptr<StreamSocket> CreateTCPSocket(unsigned server_index,
111 const NetLog::Source& source); 111 const NetLog::Source& source);
112 112
113 void ApplyPersistentData(const base::Value& data);
114 std::unique_ptr<const base::Value> GetPersistentData() const;
115
113 private: 116 private:
114 friend class base::RefCounted<DnsSession>; 117 friend class base::RefCounted<DnsSession>;
115 ~DnsSession() override; 118 ~DnsSession() override;
116 119
117 void UpdateTimeouts(NetworkChangeNotifier::ConnectionType type); 120 void UpdateTimeouts(NetworkChangeNotifier::ConnectionType type);
118 void InitializeServerStats(); 121 void InitializeServerStats();
119 122
120 // Release a socket. 123 // Release a socket.
121 void FreeSocket(unsigned server_index, 124 void FreeSocket(unsigned server_index,
122 std::unique_ptr<DatagramClientSocket> socket); 125 std::unique_ptr<DatagramClientSocket> socket);
(...skipping 29 matching lines...) Expand all
152 RttBuckets(); 155 RttBuckets();
153 }; 156 };
154 static base::LazyInstance<RttBuckets>::Leaky rtt_buckets_; 157 static base::LazyInstance<RttBuckets>::Leaky rtt_buckets_;
155 158
156 DISALLOW_COPY_AND_ASSIGN(DnsSession); 159 DISALLOW_COPY_AND_ASSIGN(DnsSession);
157 }; 160 };
158 161
159 } // namespace net 162 } // namespace net
160 163
161 #endif // NET_DNS_DNS_SESSION_H_ 164 #endif // NET_DNS_DNS_SESSION_H_
OLDNEW
« no previous file with comments | « net/dns/dns_client.cc ('k') | net/dns/dns_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698