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

Side by Side Diff: content/public/child/fixed_received_data.h

Issue 2510333002: Send encoded_body_length to renderer when response completed (2/3) (Closed)
Patch Set: rebase Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_CHILD_FIXED_RECEIVED_DATA_H_ 5 #ifndef CONTENT_PUBLIC_CHILD_FIXED_RECEIVED_DATA_H_
6 #define CONTENT_PUBLIC_CHILD_FIXED_RECEIVED_DATA_H_ 6 #define CONTENT_PUBLIC_CHILD_FIXED_RECEIVED_DATA_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/public/child/request_peer.h" 14 #include "content/public/child/request_peer.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 class CONTENT_EXPORT FixedReceivedData final 18 class CONTENT_EXPORT FixedReceivedData final
19 : public RequestPeer::ThreadSafeReceivedData { 19 : public RequestPeer::ThreadSafeReceivedData {
20 public: 20 public:
21 FixedReceivedData(const char* data, 21 FixedReceivedData(const char* data, size_t length, int encoded_data_length);
22 size_t length,
23 int encoded_data_length,
24 int encoded_body_length);
25 explicit FixedReceivedData(ReceivedData* data); 22 explicit FixedReceivedData(ReceivedData* data);
26 FixedReceivedData(const std::vector<char>& data, 23 FixedReceivedData(const std::vector<char>& data, int encoded_data_length);
27 int encoded_data_length,
28 int encoded_body_length);
29 ~FixedReceivedData() override; 24 ~FixedReceivedData() override;
30 25
31 const char* payload() const override; 26 const char* payload() const override;
32 int length() const override; 27 int length() const override;
33 int encoded_data_length() const override; 28 int encoded_data_length() const override;
34 int encoded_body_length() const override;
35 29
36 private: 30 private:
37 std::vector<char> data_; 31 std::vector<char> data_;
38 int encoded_data_length_; 32 int encoded_data_length_;
39 int encoded_body_length_;
40 33
41 DISALLOW_COPY_AND_ASSIGN(FixedReceivedData); 34 DISALLOW_COPY_AND_ASSIGN(FixedReceivedData);
42 }; 35 };
43 36
44 } // namespace content 37 } // namespace content
45 38
46 #endif // CONTENT_PUBLIC_CHILD_FIXED_RECEIVED_DATA_H_ 39 #endif // CONTENT_PUBLIC_CHILD_FIXED_RECEIVED_DATA_H_
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl_unittest.cc ('k') | content/public/child/fixed_received_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698