summaryrefslogtreecommitdiffstats
path: root/net/websockets
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-13 22:50:27 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-13 22:50:27 +0000
commitea5ef4c89bd17065f32e1f294d8b922a0735fd25 (patch)
tree530a4633c162b39a7149714d83b34a24ef1220e2 /net/websockets
parentabf7641841f0ade77b8339e3f1368c9f3ff711bd (diff)
downloadchromium_src-ea5ef4c89bd17065f32e1f294d8b922a0735fd25.zip
chromium_src-ea5ef4c89bd17065f32e1f294d8b922a0735fd25.tar.gz
chromium_src-ea5ef4c89bd17065f32e1f294d8b922a0735fd25.tar.bz2
Make net and ipc explicitly use the base namespace for Values.
They're currently relying on a using in values.h that we want to remove. I removed several usings in net for consistency. BUG= R=willchan@chromium.org Review URL: https://codereview.chromium.org/15662008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206187 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/websockets')
-rw-r--r--net/websockets/websocket_net_log_params.cc13
-rw-r--r--net/websockets/websocket_net_log_params_unittest.cc30
2 files changed, 23 insertions, 20 deletions
diff --git a/net/websockets/websocket_net_log_params.cc b/net/websockets/websocket_net_log_params.cc
index f2b33b1..dd9bdde 100644
--- a/net/websockets/websocket_net_log_params.cc
+++ b/net/websockets/websocket_net_log_params.cc
@@ -9,10 +9,11 @@
namespace net {
-Value* NetLogWebSocketHandshakeCallback(const std::string* headers,
- NetLog::LogLevel /* log_level */) {
- DictionaryValue* dict = new DictionaryValue();
- ListValue* header_list = new ListValue();
+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();
@@ -25,7 +26,7 @@ Value* NetLogWebSocketHandshakeCallback(const std::string* headers,
pos += 2;
last = pos;
- header_list->Append(new StringValue(entry));
+ header_list->Append(new base::StringValue(entry));
if (entry.empty()) {
// Dump WebSocket key3.
@@ -33,7 +34,7 @@ Value* NetLogWebSocketHandshakeCallback(const std::string* headers,
for (; pos < headers_size; ++pos) {
key += base::StringPrintf("\\x%02x", (*headers)[pos] & 0xff);
}
- header_list->Append(new StringValue(key));
+ header_list->Append(new base::StringValue(key));
break;
}
} else {
diff --git a/net/websockets/websocket_net_log_params_unittest.cc b/net/websockets/websocket_net_log_params_unittest.cc
index 0519390f..b1c9857 100644
--- a/net/websockets/websocket_net_log_params_unittest.cc
+++ b/net/websockets/websocket_net_log_params_unittest.cc
@@ -12,19 +12,21 @@
#include "testing/gtest/include/gtest/gtest.h"
TEST(NetLogWebSocketHandshakeParameterTest, ToValue) {
- ListValue* list = new ListValue();
- list->Append(new StringValue("GET /demo HTTP/1.1"));
- list->Append(new StringValue("Host: example.com"));
- list->Append(new StringValue("Connection: Upgrade"));
- list->Append(new StringValue("Sec-WebSocket-Key2: 12998 5 Y3 1 .P00"));
- list->Append(new StringValue("Sec-WebSocket-Protocol: sample"));
- list->Append(new StringValue("Upgrade: WebSocket"));
- list->Append(new StringValue("Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5"));
- list->Append(new StringValue("Origin: http://example.com"));
- list->Append(new StringValue(std::string()));
- list->Append(new StringValue("\\x00\\x01\\x0a\\x0d\\xff\\xfe\\x0d\\x0a"));
-
- DictionaryValue expected;
+ base::ListValue* list = new base::ListValue();
+ list->Append(new base::StringValue("GET /demo HTTP/1.1"));
+ list->Append(new base::StringValue("Host: example.com"));
+ list->Append(new base::StringValue("Connection: Upgrade"));
+ list->Append(new base::StringValue("Sec-WebSocket-Key2: 12998 5 Y3 1 .P00"));
+ list->Append(new base::StringValue("Sec-WebSocket-Protocol: sample"));
+ list->Append(new base::StringValue("Upgrade: WebSocket"));
+ list->Append(new base::StringValue(
+ "Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5"));
+ list->Append(new base::StringValue("Origin: http://example.com"));
+ list->Append(new base::StringValue(std::string()));
+ list->Append(new base::StringValue(
+ "\\x00\\x01\\x0a\\x0d\\xff\\xfe\\x0d\\x0a"));
+
+ base::DictionaryValue expected;
expected.Set("headers", list);
const std::string key("\x00\x01\x0a\x0d\xff\xfe\x0d\x0a", 8);
@@ -40,7 +42,7 @@ TEST(NetLogWebSocketHandshakeParameterTest, ToValue) {
"\r\n" +
key;
- scoped_ptr<Value> actual(
+ scoped_ptr<base::Value> actual(
net::NetLogWebSocketHandshakeCallback(&testInput,
net::NetLog::LOG_BASIC));