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

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

Issue 1144033002: Make SharedMemoryDataConsumerHandle thread-safe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc-data-consumer
Patch Set: rebase Created 5 years, 6 months 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 <vector> 8 #include <vector>
9 9
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/child/request_peer.h" 11 #include "content/public/child/request_peer.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class CONTENT_EXPORT FixedReceivedData final 15 class CONTENT_EXPORT FixedReceivedData final
16 : public RequestPeer::ReceivedData { 16 : public RequestPeer::ThreadSafeReceivedData {
17 public: 17 public:
18 FixedReceivedData(const char* data, size_t length, int encoded_length); 18 FixedReceivedData(const char* data, size_t length, int encoded_length);
19 explicit FixedReceivedData(ReceivedData* data); 19 explicit FixedReceivedData(ReceivedData* data);
20 FixedReceivedData(const std::vector<char>& data, int encoded_length); 20 FixedReceivedData(const std::vector<char>& data, int encoded_length);
21 ~FixedReceivedData() override; 21 ~FixedReceivedData() override;
22 22
23 const char* payload() const override; 23 const char* payload() const override;
24 int length() const override; 24 int length() const override;
25 int encoded_length() const override; 25 int encoded_length() const override;
26 26
27 private: 27 private:
28 std::vector<char> data_; 28 std::vector<char> data_;
29 int encoded_length_; 29 int encoded_length_;
30 30
31 DISALLOW_COPY_AND_ASSIGN(FixedReceivedData); 31 DISALLOW_COPY_AND_ASSIGN(FixedReceivedData);
32 }; 32 };
33 33
34 } // namespace content 34 } // namespace content
35 35
36 #endif // CONTENT_PUBLIC_CHILD_FIXED_RECEIVED_DATA_H_ 36 #endif // CONTENT_PUBLIC_CHILD_FIXED_RECEIVED_DATA_H_
OLDNEW
« no previous file with comments | « content/child/shared_memory_data_consumer_handle_unittest.cc ('k') | content/public/child/request_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698