| Index: third_party/grpc/src/core/transport/chttp2/frame.h
|
| diff --git a/third_party/WebKit/Source/platform/text/LineEnding.h b/third_party/grpc/src/core/transport/chttp2/frame.h
|
| similarity index 56%
|
| copy from third_party/WebKit/Source/platform/text/LineEnding.h
|
| copy to third_party/grpc/src/core/transport/chttp2/frame.h
|
| index 8118a626870de9433768102e9bd52974d6c2d81f..879ee036fac0f7018f01e35c2fcbbf5acf4a4fdc 100644
|
| --- a/third_party/WebKit/Source/platform/text/LineEnding.h
|
| +++ b/third_party/grpc/src/core/transport/chttp2/frame.h
|
| @@ -1,6 +1,7 @@
|
| /*
|
| - * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
|
| - * Copyright (C) 2010 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
|
| @@ -27,27 +28,42 @@
|
| * 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 LineEnding_h
|
| -#define LineEnding_h
|
| +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_H
|
| +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_H
|
| +
|
| +#include <grpc/support/port_platform.h>
|
| +#include <grpc/support/slice.h>
|
|
|
| -#include "platform/PlatformExport.h"
|
| -#include "wtf/Forward.h"
|
| -#include "wtf/Vector.h"
|
| +/* Common definitions for frame handling in the chttp2 transport */
|
|
|
| -namespace blink {
|
| +typedef enum {
|
| + GRPC_CHTTP2_PARSE_OK,
|
| + GRPC_CHTTP2_STREAM_ERROR,
|
| + GRPC_CHTTP2_CONNECTION_ERROR
|
| +} grpc_chttp2_parse_error;
|
|
|
| -// Normalize all line-endings in the given string to CRLF.
|
| -PLATFORM_EXPORT CString normalizeLineEndingsToCRLF(const CString& from);
|
| +/* defined in internal.h */
|
| +typedef struct grpc_chttp2_stream_parsing grpc_chttp2_stream_parsing;
|
| +typedef struct grpc_chttp2_transport_parsing grpc_chttp2_transport_parsing;
|
|
|
| -// Normalize all line-endings in the given string to LF and append the result to the given buffer.
|
| -PLATFORM_EXPORT void normalizeLineEndingsToLF(const CString& from, Vector<char>& result);
|
| +#define GRPC_CHTTP2_FRAME_DATA 0
|
| +#define GRPC_CHTTP2_FRAME_HEADER 1
|
| +#define GRPC_CHTTP2_FRAME_CONTINUATION 9
|
| +#define GRPC_CHTTP2_FRAME_RST_STREAM 3
|
| +#define GRPC_CHTTP2_FRAME_SETTINGS 4
|
| +#define GRPC_CHTTP2_FRAME_PING 6
|
| +#define GRPC_CHTTP2_FRAME_GOAWAY 7
|
| +#define GRPC_CHTTP2_FRAME_WINDOW_UPDATE 8
|
|
|
| -// Normalize all line-endings in the given string to the native line-endings and append the result to the given buffer.
|
| -// (Normalize to CRLF on Windows and normalize to LF on all other platforms.)
|
| -PLATFORM_EXPORT void normalizeLineEndingsToNative(const CString& from, Vector<char>& result);
|
| +#define GRPC_CHTTP2_MAX_PAYLOAD_LENGTH ((1 << 14) - 1)
|
|
|
| -} // namespace blink
|
| +#define GRPC_CHTTP2_DATA_FLAG_END_STREAM 1
|
| +#define GRPC_CHTTP2_FLAG_ACK 1
|
| +#define GRPC_CHTTP2_DATA_FLAG_END_HEADERS 4
|
| +#define GRPC_CHTTP2_DATA_FLAG_PADDED 8
|
| +#define GRPC_CHTTP2_FLAG_HAS_PRIORITY 0x20
|
|
|
| -#endif // LineEnding_h
|
| +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_H */
|
|
|