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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | net/spdy/spdy_stream_test_util.cc » ('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/spdy_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 if (delegate) 527 if (delegate)
528 delegate->OnClose(status); 528 delegate->OnClose(status);
529 } 529 }
530 530
531 void SpdyStream::Cancel() { 531 void SpdyStream::Cancel() {
532 if (cancelled()) 532 if (cancelled())
533 return; 533 return;
534 534
535 cancelled_ = true; 535 cancelled_ = true;
536 if (session_->IsStreamActive(stream_id_)) 536 if (session_->IsStreamActive(stream_id_))
537 session_->ResetStream(stream_id_, RST_STREAM_CANCEL, ""); 537 session_->ResetStream(stream_id_, RST_STREAM_CANCEL, std::string());
538 else if (stream_id_ == 0) 538 else if (stream_id_ == 0)
539 session_->CloseCreatedStream(this, RST_STREAM_CANCEL); 539 session_->CloseCreatedStream(this, RST_STREAM_CANCEL);
540 } 540 }
541 541
542 void SpdyStream::Close() { 542 void SpdyStream::Close() {
543 if (stream_id_ != 0) 543 if (stream_id_ != 0)
544 session_->CloseStream(stream_id_, net::OK); 544 session_->CloseStream(stream_id_, net::OK);
545 else 545 else
546 session_->CloseCreatedStream(this, OK); 546 session_->CloseCreatedStream(this, OK);
547 } 547 }
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 } 904 }
905 905
906 recv_window_size_ -= delta_window_size; 906 recv_window_size_ -= delta_window_size;
907 net_log_.AddEvent( 907 net_log_.AddEvent(
908 NetLog::TYPE_SPDY_STREAM_UPDATE_RECV_WINDOW, 908 NetLog::TYPE_SPDY_STREAM_UPDATE_RECV_WINDOW,
909 base::Bind(&NetLogSpdyStreamWindowUpdateCallback, 909 base::Bind(&NetLogSpdyStreamWindowUpdateCallback,
910 stream_id_, -delta_window_size, recv_window_size_)); 910 stream_id_, -delta_window_size, recv_window_size_));
911 } 911 }
912 912
913 } // namespace net 913 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | net/spdy/spdy_stream_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698