| Index: third_party/grpc/src/core/channel/compress_filter.h
|
| diff --git a/third_party/WebKit/Source/core/fileapi/FileReaderLoaderClient.h b/third_party/grpc/src/core/channel/compress_filter.h
|
| similarity index 54%
|
| copy from third_party/WebKit/Source/core/fileapi/FileReaderLoaderClient.h
|
| copy to third_party/grpc/src/core/channel/compress_filter.h
|
| index 9494f88f397b66546e80f957ffdbd2db99a9161a..415459bca60991261a74e09b099119a2bf7242b4 100644
|
| --- a/third_party/WebKit/Source/core/fileapi/FileReaderLoaderClient.h
|
| +++ b/third_party/grpc/src/core/channel/compress_filter.h
|
| @@ -1,5 +1,7 @@
|
| /*
|
| - * 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
|
| @@ -26,29 +28,38 @@
|
| * 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 FileReaderLoaderClient_h
|
| -#define FileReaderLoaderClient_h
|
| +#ifndef GRPC_INTERNAL_CORE_CHANNEL_COMPRESS_FILTER_H
|
| +#define GRPC_INTERNAL_CORE_CHANNEL_COMPRESS_FILTER_H
|
|
|
| -#include "core/CoreExport.h"
|
| -#include "core/fileapi/FileError.h"
|
| +#include "src/core/channel/channel_stack.h"
|
|
|
| -namespace blink {
|
| +#define GRPC_COMPRESS_REQUEST_ALGORITHM_KEY "grpc-internal-encoding-request"
|
|
|
| -class CORE_EXPORT FileReaderLoaderClient {
|
| -public:
|
| - virtual ~FileReaderLoaderClient() {}
|
| -
|
| - virtual void didStartLoading() = 0;
|
| - // Clients must implement this method if they are using any ReadType except ReadByClient.
|
| - virtual void didReceiveData() { ASSERT_NOT_REACHED(); }
|
| - // Clients must implement this method if they are using the ReadByClient ReadType.
|
| - virtual void didReceiveDataForClient(const char* data, unsigned dataLength) { ASSERT_NOT_REACHED(); }
|
| - virtual void didFinishLoading() = 0;
|
| - virtual void didFail(FileError::ErrorCode) = 0;
|
| -};
|
| +/** Compression filter for outgoing data.
|
| + *
|
| + * See <grpc/compression.h> for the available compression settings.
|
| + *
|
| + * Compression settings may come from:
|
| + * - Channel configuration, as established at channel creation time.
|
| + * - The metadata accompanying the outgoing data to be compressed. This is
|
| + * taken as a request only. We may choose not to honor it. The metadata key
|
| + * is given by \a GRPC_COMPRESS_REQUEST_ALGORITHM_KEY.
|
| + *
|
| + * Compression can be disabled for concrete messages (for instance in order to
|
| + * prevent CRIME/BEAST type attacks) by having the GRPC_WRITE_NO_COMPRESS set in
|
| + * the BEGIN_MESSAGE flags.
|
| + *
|
| + * The attempted compression mechanism is added to the resulting initial
|
| + * metadata under the'grpc-encoding' key.
|
| + *
|
| + * If compression is actually performed, BEGIN_MESSAGE's flag is modified to
|
| + * incorporate GRPC_WRITE_INTERNAL_COMPRESS. Otherwise, and regardless of the
|
| + * aforementioned 'grpc-encoding' metadata value, data will pass through
|
| + * uncompressed. */
|
|
|
| -} // namespace blink
|
| +extern const grpc_channel_filter grpc_compress_filter;
|
|
|
| -#endif // FileReaderLoaderClient_h
|
| +#endif /* GRPC_INTERNAL_CORE_CHANNEL_COMPRESS_FILTER_H */
|
|
|