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

Side by Side Diff: net/server/web_socket.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 unified diff | Download patch
« no previous file with comments | « net/server/http_server_unittest.cc ('k') | net/server/web_socket_encoder.h » ('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_SERVER_WEB_SOCKET_H_ 5 #ifndef NET_SERVER_WEB_SOCKET_H_
6 #define NET_SERVER_WEB_SOCKET_H_ 6 #define NET_SERVER_WEB_SOCKET_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/string_piece.h" 12 #include "base/strings/string_piece.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 class HttpConnection; 16 class HttpConnection;
17 class HttpServer; 17 class HttpServer;
18 class HttpServerRequestInfo; 18 class HttpServerRequestInfo;
19 class WebSocketEncoder; 19 class WebSocketEncoder;
20 20
21 class WebSocket final { 21 class WebSocket final {
(...skipping 11 matching lines...) Expand all
33 ParseResult Read(std::string* message); 33 ParseResult Read(std::string* message);
34 void Send(const std::string& message); 34 void Send(const std::string& message);
35 ~WebSocket(); 35 ~WebSocket();
36 36
37 private: 37 private:
38 void Fail(); 38 void Fail();
39 void SendErrorResponse(const std::string& message); 39 void SendErrorResponse(const std::string& message);
40 40
41 HttpServer* const server_; 41 HttpServer* const server_;
42 HttpConnection* const connection_; 42 HttpConnection* const connection_;
43 scoped_ptr<WebSocketEncoder> encoder_; 43 std::unique_ptr<WebSocketEncoder> encoder_;
44 bool closed_; 44 bool closed_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(WebSocket); 46 DISALLOW_COPY_AND_ASSIGN(WebSocket);
47 }; 47 };
48 48
49 } // namespace net 49 } // namespace net
50 50
51 #endif // NET_SERVER_WEB_SOCKET_H_ 51 #endif // NET_SERVER_WEB_SOCKET_H_
OLDNEW
« no previous file with comments | « net/server/http_server_unittest.cc ('k') | net/server/web_socket_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698