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

Side by Side Diff: net/socket_stream/socket_stream.h

Issue 10299002: Stop refcounting URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialize to NULL Created 8 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 | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_script_fetcher_impl_unittest.cc ('k') | net/socket_stream/socket_stream.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 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_H_ 5 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_H_
6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_ 6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // delete the object if it is changed or the job is destroyed. 131 // delete the object if it is changed or the job is destroyed.
132 UserData* GetUserData(const void* key) const; 132 UserData* GetUserData(const void* key) const;
133 void SetUserData(const void* key, UserData* data); 133 void SetUserData(const void* key, UserData* data);
134 134
135 const GURL& url() const { return url_; } 135 const GURL& url() const { return url_; }
136 bool is_secure() const; 136 bool is_secure() const;
137 const AddressList& address_list() const { return addresses_; } 137 const AddressList& address_list() const { return addresses_; }
138 Delegate* delegate() const { return delegate_; } 138 Delegate* delegate() const { return delegate_; }
139 int max_pending_send_allowed() const { return max_pending_send_allowed_; } 139 int max_pending_send_allowed() const { return max_pending_send_allowed_; }
140 140
141 URLRequestContext* context() const { return context_.get(); } 141 const URLRequestContext* context() const { return context_; }
142 void set_context(URLRequestContext* context); 142 void set_context(const URLRequestContext* context);
143 143
144 BoundNetLog* net_log() { return &net_log_; } 144 BoundNetLog* net_log() { return &net_log_; }
145 145
146 // Opens the connection on the IO thread. 146 // Opens the connection on the IO thread.
147 // Once the connection is established, calls delegate's OnConnected. 147 // Once the connection is established, calls delegate's OnConnected.
148 virtual void Connect(); 148 virtual void Connect();
149 149
150 // Requests to send |len| bytes of |data| on the connection. 150 // Requests to send |len| bytes of |data| on the connection.
151 // Returns true if |data| is buffered in the job. 151 // Returns true if |data| is buffered in the job.
152 // Returns false if size of buffered data would exceeds 152 // Returns false if size of buffered data would exceeds
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 int HandleCertificateError(int result); 315 int HandleCertificateError(int result);
316 316
317 SSLConfigService* ssl_config_service() const; 317 SSLConfigService* ssl_config_service() const;
318 ProxyService* proxy_service() const; 318 ProxyService* proxy_service() const;
319 319
320 BoundNetLog net_log_; 320 BoundNetLog net_log_;
321 321
322 GURL url_; 322 GURL url_;
323 int max_pending_send_allowed_; 323 int max_pending_send_allowed_;
324 scoped_refptr<URLRequestContext> context_; 324 const URLRequestContext* context_;
325 325
326 UserDataMap user_data_; 326 UserDataMap user_data_;
327 327
328 State next_state_; 328 State next_state_;
329 HostResolver* host_resolver_; 329 HostResolver* host_resolver_;
330 CertVerifier* cert_verifier_; 330 CertVerifier* cert_verifier_;
331 ServerBoundCertService* server_bound_cert_service_; 331 ServerBoundCertService* server_bound_cert_service_;
332 HttpAuthHandlerFactory* http_auth_handler_factory_; 332 HttpAuthHandlerFactory* http_auth_handler_factory_;
333 ClientSocketFactory* factory_; 333 ClientSocketFactory* factory_;
334 334
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 bool server_closed_; 377 bool server_closed_;
378 378
379 scoped_ptr<SocketStreamMetrics> metrics_; 379 scoped_ptr<SocketStreamMetrics> metrics_;
380 380
381 DISALLOW_COPY_AND_ASSIGN(SocketStream); 381 DISALLOW_COPY_AND_ASSIGN(SocketStream);
382 }; 382 };
383 383
384 } // namespace net 384 } // namespace net
385 385
386 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ 386 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_script_fetcher_impl_unittest.cc ('k') | net/socket_stream/socket_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698