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

Unified Diff: net/test/embedded_test_server/http_request.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
« no previous file with comments | « net/test/embedded_test_server/http_connection.cc ('k') | net/test/embedded_test_server/http_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/embedded_test_server/http_request.h
diff --git a/net/test/embedded_test_server/http_request.h b/net/test/embedded_test_server/http_request.h
index d9e54b8151bb4f20c0e5da28c419bf770f956283..b58f7749d8e8b10dfca1cd93b7045c1e09322e30 100644
--- a/net/test/embedded_test_server/http_request.h
+++ b/net/test/embedded_test_server/http_request.h
@@ -8,10 +8,10 @@
#include <stddef.h>
#include <map>
+#include <memory>
#include <string>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
#include "url/gurl.h"
@@ -73,7 +73,7 @@ struct HttpRequest {
// void OnDataChunkReceived(Socket* socket, const char* data, int size) {
// parser.ProcessChunk(std::string(data, size));
// if (parser.ParseRequest() == HttpRequestParser::ACCEPTED) {
-// scoped_ptr<HttpRequest> request = parser.GetRequest();
+// std::unique_ptr<HttpRequest> request = parser.GetRequest();
// (... process the request ...)
// }
class HttpRequestParser {
@@ -106,7 +106,7 @@ class HttpRequestParser {
// Retrieves parsed request. Can be only called, when the parser is in
// STATE_ACCEPTED state. After calling it, the parser is ready to parse
// another request.
- scoped_ptr<HttpRequest> GetRequest();
+ std::unique_ptr<HttpRequest> GetRequest();
private:
HttpMethod GetMethodType(const std::string& token) const;
@@ -124,14 +124,14 @@ class HttpRequestParser {
// no line available.
std::string ShiftLine();
- scoped_ptr<HttpRequest> http_request_;
+ std::unique_ptr<HttpRequest> http_request_;
std::string buffer_;
size_t buffer_position_; // Current position in the internal buffer.
State state_;
// Content length of the request currently being parsed.
size_t declared_content_length_;
- scoped_ptr<HttpChunkedDecoder> chunked_decoder_;
+ std::unique_ptr<HttpChunkedDecoder> chunked_decoder_;
DISALLOW_COPY_AND_ASSIGN(HttpRequestParser);
};
« no previous file with comments | « net/test/embedded_test_server/http_connection.cc ('k') | net/test/embedded_test_server/http_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698