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

Unified Diff: net/websockets/websocket_net_log_params.h

Issue 5648004: Add the "virtual" keyword on method overrides that are missing it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missing file Created 10 years 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/url_request/url_request_redirect_job.cc ('k') | net/websockets/websocket_net_log_params.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_net_log_params.h
diff --git a/net/websockets/websocket_net_log_params.h b/net/websockets/websocket_net_log_params.h
index 4cd058f0876c489440b7110b5cf29a8ff7087f33..1da234c8c4bb9d8b6a14dc74b1e7be006e9b63f1 100644
--- a/net/websockets/websocket_net_log_params.h
+++ b/net/websockets/websocket_net_log_params.h
@@ -21,47 +21,12 @@ namespace net {
class NetLogWebSocketHandshakeParameter : public NetLog::EventParameters {
public:
- explicit NetLogWebSocketHandshakeParameter(const std::string& headers)
- : headers_(headers) {
- }
+ explicit NetLogWebSocketHandshakeParameter(const std::string& headers);
- Value* ToValue() const {
- DictionaryValue* dict = new DictionaryValue();
- ListValue* headers = new ListValue();
-
- size_t last = 0;
- size_t headers_size = headers_.size();
- size_t pos = 0;
- while (pos <= headers_size) {
- if (pos == headers_size ||
- (headers_[pos] == '\r' &&
- pos + 1 < headers_size && headers_[pos + 1] == '\n')) {
- std::string entry = headers_.substr(last, pos - last);
- pos += 2;
- last = pos;
-
- headers->Append(new StringValue(entry));
-
- if (entry.empty()) {
- // Dump WebSocket key3.
- std::string key;
- for (; pos < headers_size; ++pos) {
- key += base::StringPrintf("\\x%02x", headers_[pos] & 0xff);
- }
- headers->Append(new StringValue(key));
- break;
- }
- } else {
- ++pos;
- }
- }
-
- dict->Set("headers", headers);
- return dict;
- }
+ virtual Value* ToValue() const;
private:
- ~NetLogWebSocketHandshakeParameter() {}
+ virtual ~NetLogWebSocketHandshakeParameter();
const std::string headers_;
« no previous file with comments | « net/url_request/url_request_redirect_job.cc ('k') | net/websockets/websocket_net_log_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698