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

Unified Diff: content/browser/websockets/websocket_handshake_request_info_impl.h

Issue 2397393002: Provide child/frame IDs for WebSocket handshake request (Closed)
Patch Set: fix Created 4 years, 2 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
Index: content/browser/websockets/websocket_handshake_request_info_impl.h
diff --git a/content/browser/websockets/websocket_handshake_request_info_impl.h b/content/browser/websockets/websocket_handshake_request_info_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..4e768b1f11c9f217158a8080ecc4962dd194d95f
--- /dev/null
+++ b/content/browser/websockets/websocket_handshake_request_info_impl.h
@@ -0,0 +1,38 @@
+// Copyright 2016 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.
+
+#ifndef CONTENT_BROWSER_WEBSOCKET_WEBSOCKET_HANDSHAKE_REQUEST_INFO_IMPL_H_
+#define CONTENT_BROWSER_WEBSOCKET_WEBSOCKET_HANDSHAKE_REQUEST_INFO_IMPL_H_
+
+#include "content/public/browser/websocket_handshake_request_info.h"
+
+#include "base/macros.h"
+#include "base/supports_user_data.h"
+
+namespace content {
+
+class WebSocketHandshakeRequestInfoImpl final
+ : public WebSocketHandshakeRequestInfo,
+ public base::SupportsUserData::Data {
+ public:
+ static void CreateInfoAndAssociateWithRequest(int child_id,
+ int render_frame_id,
+ net::URLRequest* request);
+
+ int GetChildId() const override;
+ int GetRenderFrameId() const override;
+
+ private:
+ WebSocketHandshakeRequestInfoImpl(int child_id, int render_frame_id);
+ ~WebSocketHandshakeRequestInfoImpl() override;
+
+ const int child_id_;
+ const int render_frame_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebSocketHandshakeRequestInfoImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_WEBSOCKET_WEBSOCKET_HANDSHAKE_REQUEST_INFO_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698