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

Unified Diff: net/websockets/websocket_channel.cc

Issue 145873006: ui/base/resource: Roll our own version of ReadBigEndian() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/websockets/websocket_basic_stream_test.cc ('k') | net/websockets/websocket_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_channel.cc
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc
index 84edecf4021c85694230b90752b2b146e06fe2f4..92d5a3ee8817b4529ea8cd1b2c2cbd163279178a 100644
--- a/net/websockets/websocket_channel.cc
+++ b/net/websockets/websocket_channel.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "base/basictypes.h" // for size_t
+#include "base/big_endian.h"
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
@@ -15,7 +16,6 @@
#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
-#include "net/base/big_endian.h"
#include "net/base/io_buffer.h"
#include "net/base/net_log.h"
#include "net/http/http_request_headers.h"
@@ -869,7 +869,7 @@ ChannelState WebSocketChannel::SendClose(uint16 code,
const size_t payload_length = kWebSocketCloseCodeLength + reason.length();
body = new IOBuffer(payload_length);
size = payload_length;
- WriteBigEndian(body->data(), code);
+ base::WriteBigEndian(body->data(), code);
COMPILE_ASSERT(sizeof(code) == kWebSocketCloseCodeLength,
they_should_both_be_two);
std::copy(
@@ -912,7 +912,7 @@ bool WebSocketChannel::ParseClose(const scoped_refptr<IOBuffer>& buffer,
}
const char* data = buffer->data();
uint16 unchecked_code = 0;
- ReadBigEndian(data, &unchecked_code);
+ base::ReadBigEndian(data, &unchecked_code);
COMPILE_ASSERT(sizeof(unchecked_code) == kWebSocketCloseCodeLength,
they_should_both_be_two_bytes);
switch (unchecked_code) {
« no previous file with comments | « net/websockets/websocket_basic_stream_test.cc ('k') | net/websockets/websocket_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698