| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 const SettingsMap* settings, | 188 const SettingsMap* settings, |
| 189 const SpdyMajorVersion protocol_version, | 189 const SpdyMajorVersion protocol_version, |
| 190 NetLogCaptureMode /* capture_mode */) { | 190 NetLogCaptureMode /* capture_mode */) { |
| 191 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 191 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 192 std::unique_ptr<base::ListValue> settings_list(new base::ListValue()); | 192 std::unique_ptr<base::ListValue> settings_list(new base::ListValue()); |
| 193 for (SettingsMap::const_iterator it = settings->begin(); | 193 for (SettingsMap::const_iterator it = settings->begin(); |
| 194 it != settings->end(); ++it) { | 194 it != settings->end(); ++it) { |
| 195 const SpdySettingsIds id = it->first; | 195 const SpdySettingsIds id = it->first; |
| 196 const SpdySettingsFlags flags = it->second.first; | 196 const SpdySettingsFlags flags = it->second.first; |
| 197 const uint32_t value = it->second.second; | 197 const uint32_t value = it->second.second; |
| 198 settings_list->Append(new base::StringValue(base::StringPrintf( | 198 settings_list->AppendString(base::StringPrintf( |
| 199 "[id:%u flags:%u value:%u]", | 199 "[id:%u flags:%u value:%u]", |
| 200 SpdyConstants::SerializeSettingId(protocol_version, id), | 200 SpdyConstants::SerializeSettingId(protocol_version, id), flags, value)); |
| 201 flags, | |
| 202 value))); | |
| 203 } | 201 } |
| 204 dict->Set("settings", std::move(settings_list)); | 202 dict->Set("settings", std::move(settings_list)); |
| 205 return std::move(dict); | 203 return std::move(dict); |
| 206 } | 204 } |
| 207 | 205 |
| 208 std::unique_ptr<base::Value> NetLogSpdyWindowUpdateFrameCallback( | 206 std::unique_ptr<base::Value> NetLogSpdyWindowUpdateFrameCallback( |
| 209 SpdyStreamId stream_id, | 207 SpdyStreamId stream_id, |
| 210 uint32_t delta, | 208 uint32_t delta, |
| 211 NetLogCaptureMode /* capture_mode */) { | 209 NetLogCaptureMode /* capture_mode */) { |
| 212 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 210 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| (...skipping 3123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3336 if (!queue->empty()) { | 3334 if (!queue->empty()) { |
| 3337 SpdyStreamId stream_id = queue->front(); | 3335 SpdyStreamId stream_id = queue->front(); |
| 3338 queue->pop_front(); | 3336 queue->pop_front(); |
| 3339 return stream_id; | 3337 return stream_id; |
| 3340 } | 3338 } |
| 3341 } | 3339 } |
| 3342 return 0; | 3340 return 0; |
| 3343 } | 3341 } |
| 3344 | 3342 |
| 3345 } // namespace net | 3343 } // namespace net |
| OLD | NEW |