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

Unified Diff: net/websockets/websocket_net_log_params.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/websockets/websocket_net_log_params.h ('k') | net/websockets/websocket_net_log_params_test.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.cc
diff --git a/net/websockets/websocket_net_log_params.cc b/net/websockets/websocket_net_log_params.cc
deleted file mode 100644
index dd9bddebf6b006f73b6ad6027de9e6b20b89c62e..0000000000000000000000000000000000000000
--- a/net/websockets/websocket_net_log_params.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/websockets/websocket_net_log_params.h"
-
-#include "base/strings/stringprintf.h"
-#include "base/values.h"
-
-namespace net {
-
-base::Value* NetLogWebSocketHandshakeCallback(
- const std::string* headers,
- NetLog::LogLevel /* log_level */) {
- base::DictionaryValue* dict = new base::DictionaryValue();
- base::ListValue* header_list = new base::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;
-
- header_list->Append(new base::StringValue(entry));
-
- if (entry.empty()) {
- // Dump WebSocket key3.
- std::string key;
- for (; pos < headers_size; ++pos) {
- key += base::StringPrintf("\\x%02x", (*headers)[pos] & 0xff);
- }
- header_list->Append(new base::StringValue(key));
- break;
- }
- } else {
- ++pos;
- }
- }
-
- dict->Set("headers", header_list);
- return dict;
-}
-
-} // namespace net
« no previous file with comments | « net/websockets/websocket_net_log_params.h ('k') | net/websockets/websocket_net_log_params_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698