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

Unified Diff: third_party/grpc/src/core/compression/message_compress.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/compression/message_compress.h
diff --git a/third_party/WebKit/public/web/WebSelector.h b/third_party/grpc/src/core/compression/message_compress.h
similarity index 64%
copy from third_party/WebKit/public/web/WebSelector.h
copy to third_party/grpc/src/core/compression/message_compress.h
index 00c5e6c18018ce879cff0e4ee1ff0e67aac3df75..14652004b860074bc3011057d57ea48076a0213d 100644
--- a/third_party/WebKit/public/web/WebSelector.h
+++ b/third_party/grpc/src/core/compression/message_compress.h
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Copyright 2015, 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,30 +28,25 @@
* 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.
+ *
*/
-#ifndef WebSelector_h
-#define WebSelector_h
-
-#include "../platform/WebCommon.h"
-
-namespace blink {
-
-class WebString;
+#ifndef GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H
+#define GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H
-// Terminology from http://dev.w3.org/csswg/selectors4/#structure.
-enum WebSelectorType {
- WebSelectorTypeComplex,
- WebSelectorTypeCompound,
- // Not yet implemented:
- // SelectorTypeSimple,
-};
+#include <grpc/compression.h>
+#include <grpc/support/slice_buffer.h>
-// Returns the value that would be returned from CSSStyleRule.selectorText in the CSSOM for a rule with this selector (which can be a list), if the selector is valid and each component in the list has the type specified in |restriction|.
-// Returns "" for an invalid selector or a selector that doesn't match the restrictions.
-// The canonical form is not guaranteed to stay the same over time.
-BLINK_EXPORT WebString canonicalizeSelector(WebString selector, WebSelectorType restriction = WebSelectorTypeComplex);
+/* compress 'input' to 'output' using 'algorithm'.
+ On success, appends compressed slices to output and returns 1.
+ On failure, appends uncompressed slices to output and returns 0. */
+int grpc_msg_compress(grpc_compression_algorithm algorithm,
+ gpr_slice_buffer* input, gpr_slice_buffer* output);
-} // namespace blink
+/* decompress 'input' to 'output' using 'algorithm'.
+ On success, appends slices to output and returns 1.
+ On failure, output is unchanged, and returns 0. */
+int grpc_msg_decompress(grpc_compression_algorithm algorithm,
+ gpr_slice_buffer* input, gpr_slice_buffer* output);
-#endif
+#endif /* GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H */

Powered by Google App Engine
This is Rietveld 408576698