| 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_framer.h" | 5 #include "net/spdy/spdy_framer.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 } | 465 } |
| 466 | 466 |
| 467 void OnAltSvc(SpdyStreamId stream_id, | 467 void OnAltSvc(SpdyStreamId stream_id, |
| 468 StringPiece origin, | 468 StringPiece origin, |
| 469 const SpdyAltSvcWireFormat::AlternativeServiceVector& | 469 const SpdyAltSvcWireFormat::AlternativeServiceVector& |
| 470 altsvc_vector) override { | 470 altsvc_vector) override { |
| 471 VLOG(1) << "OnAltSvc(" << stream_id << ", \"" << origin | 471 VLOG(1) << "OnAltSvc(" << stream_id << ", \"" << origin |
| 472 << "\", altsvc_vector)"; | 472 << "\", altsvc_vector)"; |
| 473 test_altsvc_ir_.set_stream_id(stream_id); | 473 test_altsvc_ir_.set_stream_id(stream_id); |
| 474 if (origin.length() > 0) { | 474 if (origin.length() > 0) { |
| 475 test_altsvc_ir_.set_origin(origin.as_string()); | 475 test_altsvc_ir_.set_origin(std::string(origin)); |
| 476 } | 476 } |
| 477 for (const SpdyAltSvcWireFormat::AlternativeService& altsvc : | 477 for (const SpdyAltSvcWireFormat::AlternativeService& altsvc : |
| 478 altsvc_vector) { | 478 altsvc_vector) { |
| 479 test_altsvc_ir_.add_altsvc(altsvc); | 479 test_altsvc_ir_.add_altsvc(altsvc); |
| 480 } | 480 } |
| 481 ++altsvc_count_; | 481 ++altsvc_count_; |
| 482 } | 482 } |
| 483 | 483 |
| 484 void OnPriority(SpdyStreamId stream_id, | 484 void OnPriority(SpdyStreamId stream_id, |
| 485 SpdyStreamId parent_stream_id, | 485 SpdyStreamId parent_stream_id, |
| (...skipping 4248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4734 | 4734 |
| 4735 EXPECT_EQ(1, visitor->data_frame_count_); | 4735 EXPECT_EQ(1, visitor->data_frame_count_); |
| 4736 EXPECT_EQ(strlen(four_score), static_cast<unsigned>(visitor->data_bytes_)); | 4736 EXPECT_EQ(strlen(four_score), static_cast<unsigned>(visitor->data_bytes_)); |
| 4737 EXPECT_EQ(0, visitor->headers_frame_count_); | 4737 EXPECT_EQ(0, visitor->headers_frame_count_); |
| 4738 } | 4738 } |
| 4739 } | 4739 } |
| 4740 | 4740 |
| 4741 } // namespace test | 4741 } // namespace test |
| 4742 | 4742 |
| 4743 } // namespace net | 4743 } // namespace net |
| OLD | NEW |