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

Side by Side Diff: net/socket/socket_bio_adapter.h

Issue 2414883005: TEMP DO NOT LAND (Closed)
Patch Set: tmp Created 4 years, 1 month 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/socket/client_socket_pool_manager_impl.cc ('k') | net/socket/socket_bio_adapter.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SOCKET_BIO_ADAPTER_H_ 5 #ifndef NET_SOCKET_SOCKET_BIO_ADAPTER_H_
6 #define NET_SOCKET_SOCKET_BIO_ADAPTER_H_ 6 #define NET_SOCKET_SOCKET_BIO_ADAPTER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 int write_buffer_capacity, 71 int write_buffer_capacity,
72 Delegate* delegate); 72 Delegate* delegate);
73 ~SocketBIOAdapter(); 73 ~SocketBIOAdapter();
74 74
75 BIO* bio() { return bio_.get(); } 75 BIO* bio() { return bio_.get(); }
76 76
77 // Returns true if any data has been read from the underlying StreamSocket, 77 // Returns true if any data has been read from the underlying StreamSocket,
78 // but not yet consumed by the BIO. 78 // but not yet consumed by the BIO.
79 bool HasPendingReadData(); 79 bool HasPendingReadData();
80 80
81 size_t GetEffectiveSize() const;
81 private: 82 private:
82 int BIORead(char* out, int len); 83 int BIORead(char* out, int len);
83 void HandleSocketReadResult(int result); 84 void HandleSocketReadResult(int result);
84 void OnSocketReadComplete(int result); 85 void OnSocketReadComplete(int result);
85 86
86 int BIOWrite(const char* in, int len); 87 int BIOWrite(const char* in, int len);
87 void SocketWrite(); 88 void SocketWrite();
88 void HandleSocketWriteResult(int result); 89 void HandleSocketWriteResult(int result);
89 void OnSocketWriteComplete(int result); 90 void OnSocketWriteComplete(int result);
90 void CallOnReadReady(); 91 void CallOnReadReady();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 Delegate* delegate_; 134 Delegate* delegate_;
134 135
135 base::WeakPtrFactory<SocketBIOAdapter> weak_factory_; 136 base::WeakPtrFactory<SocketBIOAdapter> weak_factory_;
136 137
137 DISALLOW_COPY_AND_ASSIGN(SocketBIOAdapter); 138 DISALLOW_COPY_AND_ASSIGN(SocketBIOAdapter);
138 }; 139 };
139 140
140 } // namespace net 141 } // namespace net
141 142
142 #endif // NET_SOCKET_SOCKET_BIO_ADAPTER_H_ 143 #endif // NET_SOCKET_SOCKET_BIO_ADAPTER_H_
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_manager_impl.cc ('k') | net/socket/socket_bio_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698