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

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

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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/proxy/proxy_config_service_linux.cc ('k') | net/spdy/spdy_http_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_JOB_H_ 5 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_JOB_H_
6 #define NET_SOCKET_STREAM_SOCKET_STREAM_JOB_H_ 6 #define NET_SOCKET_STREAM_SOCKET_STREAM_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 SocketStreamJob(); 44 SocketStreamJob();
45 void InitSocketStream(SocketStream* socket) { 45 void InitSocketStream(SocketStream* socket) {
46 socket_ = socket; 46 socket_ = socket;
47 } 47 }
48 48
49 virtual SocketStream::UserData* GetUserData(const void* key) const; 49 virtual SocketStream::UserData* GetUserData(const void* key) const;
50 virtual void SetUserData(const void* key, SocketStream::UserData* data); 50 virtual void SetUserData(const void* key, SocketStream::UserData* data);
51 51
52 URLRequestContext* context() const { 52 URLRequestContext* context() const {
53 return socket_ ? socket_->context() : 0; 53 return socket_.get() ? socket_->context() : 0;
54 } 54 }
55 void set_context(URLRequestContext* context) { 55 void set_context(URLRequestContext* context) {
56 if (socket_) 56 if (socket_.get())
57 socket_->set_context(context); 57 socket_->set_context(context);
58 } 58 }
59 59
60 virtual void Connect(); 60 virtual void Connect();
61 61
62 virtual bool SendData(const char* data, int len); 62 virtual bool SendData(const char* data, int len);
63 63
64 virtual void Close(); 64 virtual void Close();
65 65
66 virtual void RestartWithAuth(const AuthCredentials& credentials); 66 virtual void RestartWithAuth(const AuthCredentials& credentials);
67 67
(...skipping 11 matching lines...) Expand all
79 virtual ~SocketStreamJob(); 79 virtual ~SocketStreamJob();
80 80
81 scoped_refptr<SocketStream> socket_; 81 scoped_refptr<SocketStream> socket_;
82 82
83 DISALLOW_COPY_AND_ASSIGN(SocketStreamJob); 83 DISALLOW_COPY_AND_ASSIGN(SocketStreamJob);
84 }; 84 };
85 85
86 } // namespace net 86 } // namespace net
87 87
88 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_JOB_H_ 88 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_JOB_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_linux.cc ('k') | net/spdy/spdy_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698