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

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

Issue 301573002: Fix WeakPtrFactory member order in net/spdy and net/dns (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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/spdy_http_stream.h ('k') | net/spdy/spdy_proxy_client_socket.h » ('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_http_stream.h" 5 #include "net/spdy/spdy_http_stream.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "net/base/host_port_pair.h" 14 #include "net/base/host_port_pair.h"
15 #include "net/base/net_log.h" 15 #include "net/base/net_log.h"
16 #include "net/base/net_util.h" 16 #include "net/base/net_util.h"
17 #include "net/base/upload_data_stream.h" 17 #include "net/base/upload_data_stream.h"
18 #include "net/http/http_request_headers.h" 18 #include "net/http/http_request_headers.h"
19 #include "net/http/http_request_info.h" 19 #include "net/http/http_request_info.h"
20 #include "net/http/http_response_info.h" 20 #include "net/http/http_response_info.h"
21 #include "net/spdy/spdy_header_block.h" 21 #include "net/spdy/spdy_header_block.h"
22 #include "net/spdy/spdy_http_utils.h" 22 #include "net/spdy/spdy_http_utils.h"
23 #include "net/spdy/spdy_protocol.h" 23 #include "net/spdy/spdy_protocol.h"
24 #include "net/spdy/spdy_session.h" 24 #include "net/spdy/spdy_session.h"
25 25
26 namespace net { 26 namespace net {
27 27
28 SpdyHttpStream::SpdyHttpStream(const base::WeakPtr<SpdySession>& spdy_session, 28 SpdyHttpStream::SpdyHttpStream(const base::WeakPtr<SpdySession>& spdy_session,
29 bool direct) 29 bool direct)
30 : weak_factory_(this), 30 : spdy_session_(spdy_session),
31 spdy_session_(spdy_session),
32 is_reused_(spdy_session_->IsReused()), 31 is_reused_(spdy_session_->IsReused()),
33 stream_closed_(false), 32 stream_closed_(false),
34 closed_stream_status_(ERR_FAILED), 33 closed_stream_status_(ERR_FAILED),
35 closed_stream_id_(0), 34 closed_stream_id_(0),
36 closed_stream_received_bytes_(0), 35 closed_stream_received_bytes_(0),
37 request_info_(NULL), 36 request_info_(NULL),
38 response_info_(NULL), 37 response_info_(NULL),
39 response_headers_status_(RESPONSE_HEADERS_ARE_INCOMPLETE), 38 response_headers_status_(RESPONSE_HEADERS_ARE_INCOMPLETE),
40 user_buffer_len_(0), 39 user_buffer_len_(0),
41 request_body_buf_size_(0), 40 request_body_buf_size_(0),
42 buffered_read_callback_pending_(false), 41 buffered_read_callback_pending_(false),
43 more_read_data_pending_(false), 42 more_read_data_pending_(false),
44 direct_(direct) { 43 direct_(direct),
44 weak_factory_(this) {
45 DCHECK(spdy_session_.get()); 45 DCHECK(spdy_session_.get());
46 } 46 }
47 47
48 SpdyHttpStream::~SpdyHttpStream() { 48 SpdyHttpStream::~SpdyHttpStream() {
49 if (stream_.get()) { 49 if (stream_.get()) {
50 stream_->DetachDelegate(); 50 stream_->DetachDelegate();
51 DCHECK(!stream_.get()); 51 DCHECK(!stream_.get());
52 } 52 }
53 } 53 }
54 54
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 Close(false); 532 Close(false);
533 delete this; 533 delete this;
534 } 534 }
535 535
536 void SpdyHttpStream::SetPriority(RequestPriority priority) { 536 void SpdyHttpStream::SetPriority(RequestPriority priority) {
537 // TODO(akalin): Plumb this through to |stream_request_| and 537 // TODO(akalin): Plumb this through to |stream_request_| and
538 // |stream_|. 538 // |stream_|.
539 } 539 }
540 540
541 } // namespace net 541 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_stream.h ('k') | net/spdy/spdy_proxy_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698