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

Side by Side Diff: net/spdy/spdy_settings_storage.cc

Issue 8487001: Remove 13 exit time constructors and 3 static initializers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_mac_signature.cc ('k') | net/url_request/url_request.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/spdy/spdy_settings_storage.h" 5 #include "net/spdy/spdy_settings_storage.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 namespace net { 9 namespace net {
10 10
11 SpdySettingsStorage::SpdySettingsStorage() { 11 SpdySettingsStorage::SpdySettingsStorage() {
12 } 12 }
13 13
14 SpdySettingsStorage::~SpdySettingsStorage() { 14 SpdySettingsStorage::~SpdySettingsStorage() {
15 } 15 }
16 16
17 const spdy::SpdySettings& SpdySettingsStorage::Get( 17 const spdy::SpdySettings& SpdySettingsStorage::Get(
18 const HostPortPair& host_port_pair) const { 18 const HostPortPair& host_port_pair) const {
19 SettingsMap::const_iterator it = settings_map_.find(host_port_pair); 19 SettingsMap::const_iterator it = settings_map_.find(host_port_pair);
20 if (it == settings_map_.end()) { 20 if (it == settings_map_.end()) {
21 static const spdy::SpdySettings kEmpty; 21 CR_DEFINE_STATIC_LOCAL(spdy::SpdySettings, kEmpty, ());
22 return kEmpty; 22 return kEmpty;
23 } 23 }
24 return it->second; 24 return it->second;
25 } 25 }
26 26
27 void SpdySettingsStorage::Set(const HostPortPair& host_port_pair, 27 void SpdySettingsStorage::Set(const HostPortPair& host_port_pair,
28 const spdy::SpdySettings& settings) { 28 const spdy::SpdySettings& settings) {
29 spdy::SpdySettings persistent_settings; 29 spdy::SpdySettings persistent_settings;
30 30
31 // Iterate through the list, and only copy those settings which are marked 31 // Iterate through the list, and only copy those settings which are marked
(...skipping 13 matching lines...) Expand all
45 45
46 settings_map_[host_port_pair] = persistent_settings; 46 settings_map_[host_port_pair] = persistent_settings;
47 } 47 }
48 48
49 void SpdySettingsStorage::Clear() { 49 void SpdySettingsStorage::Clear() {
50 settings_map_.clear(); 50 settings_map_.clear();
51 } 51 }
52 52
53 } // namespace net 53 } // namespace net
54 54
OLDNEW
« no previous file with comments | « net/http/http_mac_signature.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698