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

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

Issue 18546008: [SPDY] Use WeakPtr<SpdySession> everywhere but SpdySessionPool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test, other minor formatting/comment changes Created 7 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_stream.h ('k') | net/spdy/spdy_stream_unittest.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/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 DCHECK_GT(stream_->stream_id(), 0u); 71 DCHECK_GT(stream_->stream_id(), 0u);
72 return scoped_ptr<SpdyBuffer>( 72 return scoped_ptr<SpdyBuffer>(
73 new SpdyBuffer(stream_->ProduceSynStreamFrame())); 73 new SpdyBuffer(stream_->ProduceSynStreamFrame()));
74 } 74 }
75 75
76 private: 76 private:
77 const base::WeakPtr<SpdyStream> stream_; 77 const base::WeakPtr<SpdyStream> stream_;
78 }; 78 };
79 79
80 SpdyStream::SpdyStream(SpdyStreamType type, 80 SpdyStream::SpdyStream(SpdyStreamType type,
81 SpdySession* session, 81 const base::WeakPtr<SpdySession>& session,
82 const GURL& url, 82 const GURL& url,
83 RequestPriority priority, 83 RequestPriority priority,
84 int32 initial_send_window_size, 84 int32 initial_send_window_size,
85 int32 initial_recv_window_size, 85 int32 initial_recv_window_size,
86 const BoundNetLog& net_log) 86 const BoundNetLog& net_log)
87 : type_(type), 87 : type_(type),
88 weak_ptr_factory_(this), 88 weak_ptr_factory_(this),
89 in_do_loop_(false), 89 in_do_loop_(false),
90 continue_buffering_data_(type_ == SPDY_PUSH_STREAM), 90 continue_buffering_data_(type_ == SPDY_PUSH_STREAM),
91 stream_id_(0), 91 stream_id_(0),
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 } 1025 }
1026 } else if (weak_this) { 1026 } else if (weak_this) {
1027 response_headers_status_ = RESPONSE_HEADERS_ARE_COMPLETE; 1027 response_headers_status_ = RESPONSE_HEADERS_ARE_COMPLETE;
1028 } 1028 }
1029 } 1029 }
1030 1030
1031 return OK; 1031 return OK;
1032 } 1032 }
1033 1033
1034 } // namespace net 1034 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream.h ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698