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

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

Issue 2169503002: Remove flip_server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months 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
« no previous file with comments | « net/spdy/buffered_spdy_framer.h ('k') | net/tools/DEPS » ('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) 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/buffered_spdy_framer.h" 5 #include "net/spdy/buffered_spdy_framer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 bool BufferedSpdyFramer::MessageFullyRead() { 315 bool BufferedSpdyFramer::MessageFullyRead() {
316 return state() == SpdyFramer::SPDY_FRAME_COMPLETE; 316 return state() == SpdyFramer::SPDY_FRAME_COMPLETE;
317 } 317 }
318 318
319 bool BufferedSpdyFramer::HasError() { 319 bool BufferedSpdyFramer::HasError() {
320 return spdy_framer_.HasError(); 320 return spdy_framer_.HasError();
321 } 321 }
322 322
323 // TODO(jgraettinger): Eliminate uses of this method (prefer 323 // TODO(jgraettinger): Eliminate uses of this method (prefer
324 // SpdySynStreamIR).
325 SpdySerializedFrame* BufferedSpdyFramer::CreateSynStream(
326 SpdyStreamId stream_id,
327 SpdyStreamId associated_stream_id,
328 SpdyPriority priority,
329 SpdyControlFlags flags,
330 SpdyHeaderBlock headers) {
331 SpdySynStreamIR syn_stream(stream_id, std::move(headers));
332 syn_stream.set_associated_to_stream_id(associated_stream_id);
333 syn_stream.set_priority(priority);
334 syn_stream.set_fin((flags & CONTROL_FLAG_FIN) != 0);
335 syn_stream.set_unidirectional((flags & CONTROL_FLAG_UNIDIRECTIONAL) != 0);
336 return new SpdySerializedFrame(spdy_framer_.SerializeSynStream(syn_stream));
337 }
338
339 // TODO(jgraettinger): Eliminate uses of this method (prefer
340 // SpdySynReplyIR).
341 SpdySerializedFrame* BufferedSpdyFramer::CreateSynReply(
342 SpdyStreamId stream_id,
343 SpdyControlFlags flags,
344 SpdyHeaderBlock headers) {
345 SpdySynReplyIR syn_reply(stream_id, std::move(headers));
346 syn_reply.set_fin(flags & CONTROL_FLAG_FIN);
347 return new SpdySerializedFrame(spdy_framer_.SerializeSynReply(syn_reply));
348 }
349
350 // TODO(jgraettinger): Eliminate uses of this method (prefer
351 // SpdyRstStreamIR). 324 // SpdyRstStreamIR).
352 SpdySerializedFrame* BufferedSpdyFramer::CreateRstStream( 325 SpdySerializedFrame* BufferedSpdyFramer::CreateRstStream(
353 SpdyStreamId stream_id, 326 SpdyStreamId stream_id,
354 SpdyRstStreamStatus status) const { 327 SpdyRstStreamStatus status) const {
355 SpdyRstStreamIR rst_ir(stream_id, status); 328 SpdyRstStreamIR rst_ir(stream_id, status);
356 return new SpdySerializedFrame(spdy_framer_.SerializeRstStream(rst_ir)); 329 return new SpdySerializedFrame(spdy_framer_.SerializeRstStream(rst_ir));
357 } 330 }
358 331
359 // TODO(jgraettinger): Eliminate uses of this method (prefer 332 // TODO(jgraettinger): Eliminate uses of this method (prefer
360 // SpdySettingsIR). 333 // SpdySettingsIR).
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 } 414 }
442 415
443 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) { 416 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) {
444 header_buffer_.clear(); 417 header_buffer_.clear();
445 header_buffer_valid_ = true; 418 header_buffer_valid_ = true;
446 header_stream_id_ = stream_id; 419 header_stream_id_ = stream_id;
447 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream); 420 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream);
448 } 421 }
449 422
450 } // namespace net 423 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/buffered_spdy_framer.h ('k') | net/tools/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698