| OLD | NEW |
| 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 #include "net/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 dict->SetString("host", host_port_pair.ToString()); | 137 dict->SetString("host", host_port_pair.ToString()); |
| 138 return std::move(dict); | 138 return std::move(dict); |
| 139 } | 139 } |
| 140 | 140 |
| 141 std::unique_ptr<base::Value> NetLogSpdySettingCallback( | 141 std::unique_ptr<base::Value> NetLogSpdySettingCallback( |
| 142 SpdySettingsIds id, | 142 SpdySettingsIds id, |
| 143 SpdySettingsFlags flags, | 143 SpdySettingsFlags flags, |
| 144 uint32_t value, | 144 uint32_t value, |
| 145 NetLogCaptureMode /* capture_mode */) { | 145 NetLogCaptureMode /* capture_mode */) { |
| 146 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 146 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 147 dict->SetInteger("id", SpdyConstants::SerializeSettingId(HTTP2, id)); | 147 dict->SetInteger("id", SpdyConstants::SerializeSettingId(id)); |
| 148 dict->SetInteger("flags", flags); | 148 dict->SetInteger("flags", flags); |
| 149 dict->SetInteger("value", value); | 149 dict->SetInteger("value", value); |
| 150 return std::move(dict); | 150 return std::move(dict); |
| 151 } | 151 } |
| 152 | 152 |
| 153 std::unique_ptr<base::Value> NetLogSpdySendSettingsCallback( | 153 std::unique_ptr<base::Value> NetLogSpdySendSettingsCallback( |
| 154 const SettingsMap* settings, | 154 const SettingsMap* settings, |
| 155 NetLogCaptureMode /* capture_mode */) { | 155 NetLogCaptureMode /* capture_mode */) { |
| 156 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 156 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 157 std::unique_ptr<base::ListValue> settings_list(new base::ListValue()); | 157 std::unique_ptr<base::ListValue> settings_list(new base::ListValue()); |
| 158 for (SettingsMap::const_iterator it = settings->begin(); | 158 for (SettingsMap::const_iterator it = settings->begin(); |
| 159 it != settings->end(); ++it) { | 159 it != settings->end(); ++it) { |
| 160 const SpdySettingsIds id = it->first; | 160 const SpdySettingsIds id = it->first; |
| 161 const SpdySettingsFlags flags = it->second.first; | 161 const SpdySettingsFlags flags = it->second.first; |
| 162 const uint32_t value = it->second.second; | 162 const uint32_t value = it->second.second; |
| 163 settings_list->AppendString(base::StringPrintf( | 163 settings_list->AppendString(base::StringPrintf( |
| 164 "[id:%u flags:%u value:%u]", | 164 "[id:%u flags:%u value:%u]", SpdyConstants::SerializeSettingId(id), |
| 165 SpdyConstants::SerializeSettingId(HTTP2, id), flags, value)); | 165 flags, value)); |
| 166 } | 166 } |
| 167 dict->Set("settings", std::move(settings_list)); | 167 dict->Set("settings", std::move(settings_list)); |
| 168 return std::move(dict); | 168 return std::move(dict); |
| 169 } | 169 } |
| 170 | 170 |
| 171 std::unique_ptr<base::Value> NetLogSpdyWindowUpdateFrameCallback( | 171 std::unique_ptr<base::Value> NetLogSpdyWindowUpdateFrameCallback( |
| 172 SpdyStreamId stream_id, | 172 SpdyStreamId stream_id, |
| 173 uint32_t delta, | 173 uint32_t delta, |
| 174 NetLogCaptureMode /* capture_mode */) { | 174 NetLogCaptureMode /* capture_mode */) { |
| 175 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 175 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| (...skipping 2819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2995 if (!queue->empty()) { | 2995 if (!queue->empty()) { |
| 2996 SpdyStreamId stream_id = queue->front(); | 2996 SpdyStreamId stream_id = queue->front(); |
| 2997 queue->pop_front(); | 2997 queue->pop_front(); |
| 2998 return stream_id; | 2998 return stream_id; |
| 2999 } | 2999 } |
| 3000 } | 3000 } |
| 3001 return 0; | 3001 return 0; |
| 3002 } | 3002 } |
| 3003 | 3003 |
| 3004 } // namespace net | 3004 } // namespace net |
| OLD | NEW |