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

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

Issue 2632803002: Remove all blimp network code. (Closed)
Patch Set: merge from origin/master for good measure Created 3 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_H_
6 #define BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_H_
7
8 #include <vector>
9
10 #include "blimp/common/blob_cache/blob_cache.h"
11 #include "blimp/net/blimp_net_export.h"
12
13 namespace blimp {
14
15 // Blob size upper limit, for abuse prevention.
16 const size_t kMaxBlobSizeBytes = 10 * 1024 * 1024;
17
18 class BLIMP_NET_EXPORT BlobChannelSender {
19 public:
20 struct CacheStateEntry {
21 BlobId id;
22 bool was_delivered;
23 };
24
25 virtual ~BlobChannelSender() {}
26
27 // Gets the list of cache keys and their replication status in the BlobCache.
28 virtual std::vector<CacheStateEntry> GetCachedBlobIds() const = 0;
29
30 // Puts a blob in the local BlobChannel. The blob can then be pushed to the
31 // remote receiver via "DeliverBlob()".
32 // Does nothing if there is already a blob |id| in the channel.
33 virtual void PutBlob(const BlobId& id, BlobDataPtr data) = 0;
34
35 // Sends the blob |id| to the remote side, if the remote side doesn't already
36 // have the blob.
37 virtual void DeliverBlob(const BlobId& id) = 0;
38 };
39
40 } // namespace blimp
41
42 #endif // BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_H_
OLDNEW
« no previous file with comments | « blimp/net/blob_channel/blob_channel_receiver_unittest.cc ('k') | blimp/net/blob_channel/blob_channel_sender_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698