OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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() { |
| 15 } |
| 16 |
14 const spdy::SpdySettings& SpdySettingsStorage::Get( | 17 const spdy::SpdySettings& SpdySettingsStorage::Get( |
15 const HostPortPair& host_port_pair) const { | 18 const HostPortPair& host_port_pair) const { |
16 SettingsMap::const_iterator it = settings_map_.find(host_port_pair); | 19 SettingsMap::const_iterator it = settings_map_.find(host_port_pair); |
17 if (it == settings_map_.end()) { | 20 if (it == settings_map_.end()) { |
18 static const spdy::SpdySettings kEmpty; | 21 static const spdy::SpdySettings kEmpty; |
19 return kEmpty; | 22 return kEmpty; |
20 } | 23 } |
21 return it->second; | 24 return it->second; |
22 } | 25 } |
23 | 26 |
(...skipping 14 matching lines...) Expand all Loading... |
38 | 41 |
39 // If we didn't persist anything, then we are done. | 42 // If we didn't persist anything, then we are done. |
40 if (persistent_settings.empty()) | 43 if (persistent_settings.empty()) |
41 return; | 44 return; |
42 | 45 |
43 settings_map_[host_port_pair] = persistent_settings; | 46 settings_map_[host_port_pair] = persistent_settings; |
44 } | 47 } |
45 | 48 |
46 } // namespace net | 49 } // namespace net |
47 | 50 |
OLD | NEW |