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

Unified Diff: third_party/grpc/src/core/transport/chttp2/bin_encoder.h

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: third_party/grpc/src/core/transport/chttp2/bin_encoder.h
diff --git a/third_party/WebKit/Source/platform/exported/WebSocketHandshakeRequestInfo.cpp b/third_party/grpc/src/core/transport/chttp2/bin_encoder.h
similarity index 65%
copy from third_party/WebKit/Source/platform/exported/WebSocketHandshakeRequestInfo.cpp
copy to third_party/grpc/src/core/transport/chttp2/bin_encoder.h
index 8b4e7a518178908d03bb5e2a4e20a78cc398739a..036fddf9981e103297cc01ae5a7485051a5c2225 100644
--- a/third_party/WebKit/Source/platform/exported/WebSocketHandshakeRequestInfo.cpp
+++ b/third_party/grpc/src/core/transport/chttp2/bin_encoder.h
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Copyright 2015-2016, Google Inc.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,38 +28,27 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
*/
-#include "public/platform/modules/websockets/WebSocketHandshakeRequestInfo.h"
-
-#include "platform/network/WebSocketHandshakeRequest.h"
-#include "public/platform/WebString.h"
-#include "public/platform/WebURL.h"
-
-namespace blink {
-
-WebSocketHandshakeRequestInfo::WebSocketHandshakeRequestInfo() : m_private(WebSocketHandshakeRequest::create())
-{
-}
+#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_BIN_ENCODER_H
+#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_BIN_ENCODER_H
-WebSocketHandshakeRequestInfo::~WebSocketHandshakeRequestInfo()
-{
- m_private.reset();
-}
+#include <grpc/support/slice.h>
-void WebSocketHandshakeRequestInfo::setURL(const WebURL& url)
-{
- m_private->setURL(url);
-}
+/* base64 encode a slice. Returns a new slice, does not take ownership of the
+ input */
+gpr_slice grpc_chttp2_base64_encode(gpr_slice input);
-void WebSocketHandshakeRequestInfo::addHeaderField(const WebString& name, const WebString& value)
-{
- m_private->addAndMergeHeader(name, value);
-}
+/* Compress a slice with the static huffman encoder detailed in the hpack
+ standard. Returns a new slice, does not take ownership of the input */
+gpr_slice grpc_chttp2_huffman_compress(gpr_slice input);
-void WebSocketHandshakeRequestInfo::setHeadersText(const WebString& text)
-{
- m_private->setHeadersText(text);
-}
+/* equivalent to:
+ gpr_slice x = grpc_chttp2_base64_encode(input);
+ gpr_slice y = grpc_chttp2_huffman_compress(x);
+ gpr_slice_unref(x);
+ return y; */
+gpr_slice grpc_chttp2_base64_encode_and_huffman_compress(gpr_slice input);
-} // namespace blink
+#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_BIN_ENCODER_H */
« no previous file with comments | « third_party/grpc/src/core/transport/chttp2/alpn.c ('k') | third_party/grpc/src/core/transport/chttp2/bin_encoder.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698