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

Unified Diff: net/test/embedded_test_server/http_connection.h

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 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
Index: net/test/embedded_test_server/http_connection.h
diff --git a/net/test/embedded_test_server/http_connection.h b/net/test/embedded_test_server/http_connection.h
index 4f4e555f959d513687fd3ab26f4b7b6af9ac4cde..0b87fcb218dc22f75fb0103ab53252bf907198ca 100644
--- a/net/test/embedded_test_server/http_connection.h
+++ b/net/test/embedded_test_server/http_connection.h
@@ -5,10 +5,11 @@
#ifndef NET_TEST_EMBEDDED_TEST_SERVER_HTTP_CONNECTION_H_
#define NET_TEST_EMBEDDED_TEST_SERVER_HTTP_CONNECTION_H_
+#include <memory>
+
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string_piece.h"
#include "net/base/completion_callback.h"
@@ -28,14 +29,14 @@ class HttpResponse;
// Calblack called when a request is parsed. Response should be sent
// using HttpConnection::SendResponse() on the |connection| argument.
typedef base::Callback<void(HttpConnection* connection,
- scoped_ptr<HttpRequest> request)>
+ std::unique_ptr<HttpRequest> request)>
HandleRequestCallback;
// Wraps the connection socket. Accepts incoming data and sends responses.
// If a valid request is parsed, then |callback_| is invoked.
class HttpConnection {
public:
- HttpConnection(scoped_ptr<StreamSocket> socket,
+ HttpConnection(std::unique_ptr<StreamSocket> socket,
const HandleRequestCallback& callback);
~HttpConnection();
@@ -61,7 +62,7 @@ class HttpConnection {
base::WeakPtr<HttpConnection> GetWeakPtr();
- scoped_ptr<StreamSocket> socket_;
+ std::unique_ptr<StreamSocket> socket_;
const HandleRequestCallback callback_;
HttpRequestParser request_parser_;
scoped_refptr<IOBufferWithSize> read_buf_;
« no previous file with comments | « net/test/embedded_test_server/embedded_test_server_unittest.cc ('k') | net/test/embedded_test_server/http_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698