| OLD | NEW |
| 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_IMPL_H_ | 5 #ifndef BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_IMPL_H_ |
| 6 #define BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_IMPL_H_ | 6 #define BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/weak_ptr.h" |
| 14 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
| 15 #include "blimp/common/blob_cache/blob_cache.h" | 16 #include "blimp/common/blob_cache/blob_cache.h" |
| 16 #include "blimp/net/blimp_net_export.h" | 17 #include "blimp/net/blimp_net_export.h" |
| 17 #include "blimp/net/blob_channel/blob_channel_sender.h" | 18 #include "blimp/net/blob_channel/blob_channel_sender.h" |
| 18 | 19 |
| 19 namespace blimp { | 20 namespace blimp { |
| 20 | 21 |
| 21 // Sends blobs to a remote receiver. | 22 // Sends blobs to a remote receiver. |
| 22 // The transport-specific details are provided by the caller using the Delegate | 23 // The transport-specific details are provided by the caller using the Delegate |
| 23 // subclass. | 24 // subclass. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 45 | 46 |
| 46 private: | 47 private: |
| 47 std::unique_ptr<BlobCache> cache_; | 48 std::unique_ptr<BlobCache> cache_; |
| 48 std::unique_ptr<Delegate> delegate_; | 49 std::unique_ptr<Delegate> delegate_; |
| 49 | 50 |
| 50 // Used to track the item IDs in the receiver's cache. This may differ from | 51 // Used to track the item IDs in the receiver's cache. This may differ from |
| 51 // the set of IDs in |cache_|, for instance if an ID hasn't yet been | 52 // the set of IDs in |cache_|, for instance if an ID hasn't yet been |
| 52 // delivered, or has been evicted at the receiver. | 53 // delivered, or has been evicted at the receiver. |
| 53 std::set<BlobId> receiver_cache_contents_; | 54 std::set<BlobId> receiver_cache_contents_; |
| 54 | 55 |
| 56 base::WeakPtrFactory<BlobChannelSenderImpl> weak_factory_; |
| 57 |
| 55 DISALLOW_COPY_AND_ASSIGN(BlobChannelSenderImpl); | 58 DISALLOW_COPY_AND_ASSIGN(BlobChannelSenderImpl); |
| 56 }; | 59 }; |
| 57 | 60 |
| 58 } // namespace blimp | 61 } // namespace blimp |
| 59 | 62 |
| 60 #endif // BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_IMPL_H_ | 63 #endif // BLIMP_NET_BLOB_CHANNEL_BLOB_CHANNEL_SENDER_IMPL_H_ |
| OLD | NEW |