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

Unified Diff: net/socket/client_socket_pool_base.h

Issue 1756019: Fix some uses of scoped_ptr.release() in net/ such that the return value is not ignored. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: add back the change that got lost in the void Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/file_posix.cc ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_base.h
diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
index ce2546312c5216b7a9902a7268d5b78d071b1c59..91289d82dbfbf51b6558fd976fd5c64bdc80b6fd 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -176,8 +176,8 @@ class ClientSocketPoolBaseHelper
NetworkChangeNotifier* network_change_notifier);
// See ClientSocketPool::RequestSocket for documentation on this function.
- // Note that |request| must be heap allocated. If ERR_IO_PENDING is returned,
- // then ClientSocketPoolBaseHelper takes ownership of |request|.
+ // ClientSocketPoolBaseHelper takes ownership of |request|, which must be
+ // heap allocated.
int RequestSocket(const std::string& group_name, const Request* request);
// See ClientSocketPool::CancelRequest for documentation on this function.
@@ -526,12 +526,8 @@ class ClientSocketPoolBase {
ClientSocketHandle* handle,
CompletionCallback* callback,
const BoundNetLog& net_log) {
- scoped_ptr<Request> request(
- new Request(handle, callback, priority, params, net_log));
- int rv = helper_->RequestSocket(group_name, request.get());
- if (rv == ERR_IO_PENDING)
- request.release();
- return rv;
+ Request* request = new Request(handle, callback, priority, params, net_log);
+ return helper_->RequestSocket(group_name, request);
}
void CancelRequest(const std::string& group_name,
« no previous file with comments | « net/disk_cache/file_posix.cc ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698