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

Side by Side Diff: blimp/net/blob_channel/blob_channel_sender.h

Issue 2033013003: Use shared memory for moving data over BlobChannel Mojo interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blobchannel-master
Patch Set: IPC owners file added. Created 4 years, 5 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
« no previous file with comments | « blimp/net/BUILD.gn ('k') | blimp/net/blob_channel/mock_blob_channel_sender.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_H_ 5 #ifndef BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_H_
6 #define BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_H_ 6 #define BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_H_
7 7
8 #include "blimp/common/blob_cache/blob_cache.h" 8 #include "blimp/common/blob_cache/blob_cache.h"
9 #include "blimp/net/blimp_net_export.h" 9 #include "blimp/net/blimp_net_export.h"
10 10
11 namespace blimp { 11 namespace blimp {
12 12
13 // Blob size upper limit, for abuse prevention.
14 const size_t kMaxBlobSizeBytes = 10 * 1024 * 1024;
15
13 class BLIMP_NET_EXPORT BlobChannelSender { 16 class BLIMP_NET_EXPORT BlobChannelSender {
14 public: 17 public:
15 virtual ~BlobChannelSender() {} 18 virtual ~BlobChannelSender() {}
16 19
17 // Puts a blob in the local BlobChannel. The blob can then be pushed to the 20 // Puts a blob in the local BlobChannel. The blob can then be pushed to the
18 // remote receiver via "DeliverBlob()". 21 // remote receiver via "DeliverBlob()".
19 // Does nothing if there is already a blob |id| in the channel. 22 // Does nothing if there is already a blob |id| in the channel.
20 virtual void PutBlob(const BlobId& id, BlobDataPtr data) = 0; 23 virtual void PutBlob(const BlobId& id, BlobDataPtr data) = 0;
21 24
22 // Sends the blob |id| to the remote side, if the remote side doesn't already 25 // Sends the blob |id| to the remote side, if the remote side doesn't already
23 // have the blob. 26 // have the blob.
24 virtual void DeliverBlob(const BlobId& id) = 0; 27 virtual void DeliverBlob(const BlobId& id) = 0;
25 }; 28 };
26 29
27 } // namespace blimp 30 } // namespace blimp
28 31
29 #endif // BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_H_ 32 #endif // BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_H_
OLDNEW
« no previous file with comments | « blimp/net/BUILD.gn ('k') | blimp/net/blob_channel/mock_blob_channel_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698