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

Side by Side Diff: content/child/shared_memory_received_data_factory.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_CHILD_SHARED_MEMORY_RECEIVED_DATA_FACTORY_H_ 5 #ifndef CONTENT_CHILD_SHARED_MEMORY_RECEIVED_DATA_FACTORY_H_
6 #define CONTENT_CHILD_SHARED_MEMORY_RECEIVED_DATA_FACTORY_H_ 6 #define CONTENT_CHILD_SHARED_MEMORY_RECEIVED_DATA_FACTORY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 class CONTENT_EXPORT SharedMemoryReceivedDataFactory final 27 class CONTENT_EXPORT SharedMemoryReceivedDataFactory final
28 : public base::RefCounted<SharedMemoryReceivedDataFactory> { 28 : public base::RefCounted<SharedMemoryReceivedDataFactory> {
29 public: 29 public:
30 SharedMemoryReceivedDataFactory(IPC::Sender* message_sender, 30 SharedMemoryReceivedDataFactory(IPC::Sender* message_sender,
31 int request_id, 31 int request_id,
32 linked_ptr<base::SharedMemory> memory); 32 linked_ptr<base::SharedMemory> memory);
33 33
34 std::unique_ptr<RequestPeer::ReceivedData> Create(int offset, 34 std::unique_ptr<RequestPeer::ReceivedData> Create(int offset,
35 int length, 35 int length,
36 int encoded_data_length, 36 int encoded_data_length);
37 int encoded_body_length);
38 37
39 // Stops this factory. After calling this function, releasing issued data 38 // Stops this factory. After calling this function, releasing issued data
40 // won't send ack signal to the browser process. 39 // won't send ack signal to the browser process.
41 void Stop(); 40 void Stop();
42 41
43 private: 42 private:
44 // Here TicketId is uint32_t, but a factory may issue more data by reusing id. 43 // Here TicketId is uint32_t, but a factory may issue more data by reusing id.
45 using TicketId = uint32_t; 44 using TicketId = uint32_t;
46 45
47 class SharedMemoryReceivedData; 46 class SharedMemoryReceivedData;
(...skipping 15 matching lines...) Expand all
63 bool is_stopped_; 62 bool is_stopped_;
64 // Just to keep the payload alive while issued data is alive. 63 // Just to keep the payload alive while issued data is alive.
65 linked_ptr<base::SharedMemory> memory_; 64 linked_ptr<base::SharedMemory> memory_;
66 65
67 DISALLOW_COPY_AND_ASSIGN(SharedMemoryReceivedDataFactory); 66 DISALLOW_COPY_AND_ASSIGN(SharedMemoryReceivedDataFactory);
68 }; 67 };
69 68
70 } // namespace content 69 } // namespace content
71 70
72 #endif // CONTENT_CHILD_SHARED_MEMORY_RECEIVED_DATA_FACTORY_H_ 71 #endif // CONTENT_CHILD_SHARED_MEMORY_RECEIVED_DATA_FACTORY_H_
OLDNEW
« no previous file with comments | « content/child/shared_memory_data_consumer_handle_unittest.cc ('k') | content/child/shared_memory_received_data_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698