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

Side by Side Diff: net/spdy/spdy_proxy_client_socket.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_proxy_client_socket.h ('k') | net/spdy/spdy_session.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_proxy_client_socket.h" 5 #include "net/spdy/spdy_proxy_client_socket.h"
6 6
7 #include <algorithm> // min 7 #include <algorithm> // min
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 27 matching lines...) Expand all
38 endpoint_(endpoint), 38 endpoint_(endpoint),
39 auth_( 39 auth_(
40 new HttpAuthController(HttpAuth::AUTH_PROXY, 40 new HttpAuthController(HttpAuth::AUTH_PROXY,
41 GURL("https://" + proxy_server.ToString()), 41 GURL("https://" + proxy_server.ToString()),
42 auth_cache, 42 auth_cache,
43 auth_handler_factory)), 43 auth_handler_factory)),
44 user_buffer_len_(0), 44 user_buffer_len_(0),
45 write_buffer_len_(0), 45 write_buffer_len_(0),
46 was_ever_used_(false), 46 was_ever_used_(false),
47 redirect_has_load_timing_info_(false), 47 redirect_has_load_timing_info_(false),
48 weak_factory_(this),
49 net_log_(BoundNetLog::Make(spdy_stream->net_log().net_log(), 48 net_log_(BoundNetLog::Make(spdy_stream->net_log().net_log(),
50 NetLog::SOURCE_PROXY_CLIENT_SOCKET)) { 49 NetLog::SOURCE_PROXY_CLIENT_SOCKET)),
50 weak_factory_(this) {
51 request_.method = "CONNECT"; 51 request_.method = "CONNECT";
52 request_.url = url; 52 request_.url = url;
53 if (!user_agent.empty()) 53 if (!user_agent.empty())
54 request_.extra_headers.SetHeader(HttpRequestHeaders::kUserAgent, 54 request_.extra_headers.SetHeader(HttpRequestHeaders::kUserAgent,
55 user_agent); 55 user_agent);
56 56
57 net_log_.BeginEvent(NetLog::TYPE_SOCKET_ALIVE, 57 net_log_.BeginEvent(NetLog::TYPE_SOCKET_ALIVE,
58 source_net_log.source().ToEventParametersCallback()); 58 source_net_log.source().ToEventParametersCallback());
59 net_log_.AddEvent( 59 net_log_.AddEvent(
60 NetLog::TYPE_SPDY_PROXY_CLIENT_SESSION, 60 NetLog::TYPE_SPDY_PROXY_CLIENT_SESSION,
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 } else if (!read_callback_.is_null()) { 516 } else if (!read_callback_.is_null()) {
517 // If we have a read_callback_, the we need to make sure we call it back. 517 // If we have a read_callback_, the we need to make sure we call it back.
518 OnDataReceived(scoped_ptr<SpdyBuffer>()); 518 OnDataReceived(scoped_ptr<SpdyBuffer>());
519 } 519 }
520 // This may have been deleted by read_callback_, so check first. 520 // This may have been deleted by read_callback_, so check first.
521 if (weak_ptr.get() && !write_callback.is_null()) 521 if (weak_ptr.get() && !write_callback.is_null())
522 write_callback.Run(ERR_CONNECTION_CLOSED); 522 write_callback.Run(ERR_CONNECTION_CLOSED);
523 } 523 }
524 524
525 } // namespace net 525 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698