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

Unified Diff: content/browser/renderer_host/websocket_host.cc

Issue 170843007: Introduce url::Origin to represent Web Origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 | « content/browser/renderer_host/websocket_host.h ('k') | content/child/websocket_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/websocket_host.cc
diff --git a/content/browser/renderer_host/websocket_host.cc b/content/browser/renderer_host/websocket_host.cc
index b4a7cee43f2520ee51e69b811db88ffb3c6f908d..4346c4d0c89b520d079d9939c36352adebb5e5a1 100644
--- a/content/browser/renderer_host/websocket_host.cc
+++ b/content/browser/renderer_host/websocket_host.cc
@@ -17,6 +17,7 @@
#include "net/websockets/websocket_frame.h" // for WebSocketFrameHeader::OpCode
#include "net/websockets/websocket_handshake_request_info.h"
#include "net/websockets/websocket_handshake_response_info.h"
+#include "url/origin.h"
namespace content {
@@ -240,14 +241,15 @@ bool WebSocketHost::OnMessageReceived(const IPC::Message& message,
void WebSocketHost::OnAddChannelRequest(
const GURL& socket_url,
const std::vector<std::string>& requested_protocols,
- const GURL& origin) {
+ const url::Origin& origin) {
DVLOG(3) << "WebSocketHost::OnAddChannelRequest"
<< " routing_id=" << routing_id_ << " socket_url=\"" << socket_url
<< "\" requested_protocols=\""
- << JoinString(requested_protocols, ", ") << "\" origin=\"" << origin
- << "\"";
+ << JoinString(requested_protocols, ", ") << "\" origin=\""
+ << origin.string() << "\"";
- channel_->SendAddChannelRequest(socket_url, requested_protocols, origin);
+ channel_->SendAddChannelRequest(
+ socket_url, requested_protocols, origin);
}
void WebSocketHost::OnSendFrame(bool fin,
« no previous file with comments | « content/browser/renderer_host/websocket_host.h ('k') | content/child/websocket_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698