[Android WebView] Fix webview perf bot switchover to use org.chromium.webview_shell...
[chromium-blink-merge.git] / content / public / child / fixed_received_data.h
blob8acba46f3926e3276cee7ad9c5c37c6198ba93af
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_CHILD_FIXED_RECEIVED_DATA_H_
6 #define CONTENT_PUBLIC_CHILD_FIXED_RECEIVED_DATA_H_
8 #include <vector>
10 #include "content/common/content_export.h"
11 #include "content/public/child/request_peer.h"
13 namespace content {
15 class CONTENT_EXPORT FixedReceivedData final
16 : public RequestPeer::ThreadSafeReceivedData {
17 public:
18 FixedReceivedData(const char* data, size_t length, int encoded_length);
19 explicit FixedReceivedData(ReceivedData* data);
20 FixedReceivedData(const std::vector<char>& data, int encoded_length);
21 ~FixedReceivedData() override;
23 const char* payload() const override;
24 int length() const override;
25 int encoded_length() const override;
27 private:
28 std::vector<char> data_;
29 int encoded_length_;
31 DISALLOW_COPY_AND_ASSIGN(FixedReceivedData);
34 } // namespace content
36 #endif // CONTENT_PUBLIC_CHILD_FIXED_RECEIVED_DATA_H_