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

Side by Side Diff: net/websockets/websocket_extension.h

Issue 1340523002: Fix WebSocketServer extension parser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ws-constructor-fix
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_WEBSOCKETS_WEBSOCKET_EXTENSION_H_ 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_EXTENSION_H_
6 #define NET_WEBSOCKETS_WEBSOCKET_EXTENSION_H_ 6 #define NET_WEBSOCKETS_WEBSOCKET_EXTENSION_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 26 matching lines...) Expand all
37 }; 37 };
38 38
39 WebSocketExtension(); 39 WebSocketExtension();
40 explicit WebSocketExtension(const std::string& name); 40 explicit WebSocketExtension(const std::string& name);
41 ~WebSocketExtension(); 41 ~WebSocketExtension();
42 42
43 void Add(const Parameter& parameter) { parameters_.push_back(parameter); } 43 void Add(const Parameter& parameter) { parameters_.push_back(parameter); }
44 const std::string& name() const { return name_; } 44 const std::string& name() const { return name_; }
45 const std::vector<Parameter>& parameters() const { return parameters_; } 45 const std::vector<Parameter>& parameters() const { return parameters_; }
46 bool Equals(const WebSocketExtension& other) const; 46 bool Equals(const WebSocketExtension& other) const;
47 std::string ToString() const;
47 48
48 // The default copy constructor and the assignment operator are defined: 49 // The default copy constructor and the assignment operator are defined:
49 // we need them. 50 // we need them.
50 private: 51 private:
51 std::string name_; 52 std::string name_;
52 std::vector<Parameter> parameters_; 53 std::vector<Parameter> parameters_;
53 }; 54 };
54 55
55 } // namespace net 56 } // namespace net
56 57
57 #endif // NET_WEBSOCKETS_WEBSOCKET_EXTENSION_H_ 58 #endif // NET_WEBSOCKETS_WEBSOCKET_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698