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

Side by Side Diff: net/quic/chromium/quic_server_info.cc

Issue 2678333003: Use base::STLClearObject in QuicServerInfo (Closed)
Patch Set: Created 3 years, 10 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 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 #include "net/quic/chromium/quic_server_info.h" 5 #include "net/quic/chromium/quic_server_info.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/pickle.h" 9 #include "base/pickle.h"
10 #include "base/stl_util.h"
10 11
11 using std::string; 12 using std::string;
12 13
13 namespace { 14 namespace {
14 15
15 const int kQuicCryptoConfigVersion = 2; 16 const int kQuicCryptoConfigVersion = 2;
16 17
17 } // namespace 18 } // namespace
18 19
19 namespace net { 20 namespace net {
20 21
21 QuicServerInfo::State::State() {} 22 QuicServerInfo::State::State() {}
22 23
23 QuicServerInfo::State::~State() {} 24 QuicServerInfo::State::~State() {}
24 25
25 void QuicServerInfo::State::Clear() { 26 void QuicServerInfo::State::Clear() {
26 server_config.clear(); 27 base::STLClearObject(&server_config);
27 source_address_token.clear(); 28 base::STLClearObject(&source_address_token);
28 cert_sct.clear(); 29 base::STLClearObject(&cert_sct);
29 chlo_hash.clear(); 30 base::STLClearObject(&chlo_hash);
30 server_config_sig.clear(); 31 base::STLClearObject(&server_config_sig);
31 certs.clear(); 32 base::STLClearObject(&certs);
32 } 33 }
33 34
34 QuicServerInfo::QuicServerInfo(const QuicServerId& server_id) 35 QuicServerInfo::QuicServerInfo(const QuicServerId& server_id)
35 : server_id_(server_id) {} 36 : server_id_(server_id) {}
36 37
37 QuicServerInfo::~QuicServerInfo() {} 38 QuicServerInfo::~QuicServerInfo() {}
38 39
39 const QuicServerInfo::State& QuicServerInfo::state() const { 40 const QuicServerInfo::State& QuicServerInfo::state() const {
40 return state_; 41 return state_;
41 } 42 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 return string(); 142 return string();
142 } 143 }
143 } 144 }
144 145
145 return string(reinterpret_cast<const char*>(p.data()), p.size()); 146 return string(reinterpret_cast<const char*>(p.data()), p.size());
146 } 147 }
147 148
148 QuicServerInfoFactory::~QuicServerInfoFactory() {} 149 QuicServerInfoFactory::~QuicServerInfoFactory() {}
149 150
150 } // namespace net 151 } // 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