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

Unified Diff: blimp/net/blob_channel/blob_channel_sender_impl.h

Issue 2256363003: Clean up thread handling in Blimp browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: blimp/net/blob_channel/blob_channel_sender_impl.h
diff --git a/blimp/net/blob_channel/blob_channel_sender_impl.h b/blimp/net/blob_channel/blob_channel_sender_impl.h
index 4c0db42c9dc144363641faca45fafb277932c2a5..3042b55117cee2ea6200a5ccbdf3bb366c5eb382 100644
--- a/blimp/net/blob_channel/blob_channel_sender_impl.h
+++ b/blimp/net/blob_channel/blob_channel_sender_impl.h
@@ -11,6 +11,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "blimp/common/blob_cache/blob_cache.h"
#include "blimp/net/blimp_net_export.h"
@@ -37,6 +38,8 @@ class BLIMP_NET_EXPORT BlobChannelSenderImpl : public BlobChannelSender {
std::unique_ptr<Delegate> delegate);
~BlobChannelSenderImpl() override;
+ base::WeakPtr<BlobChannelSenderImpl> GetWeakPtr();
Wez 2016/08/19 19:15:50 Rather than pollute BlobChannelSenderImpl with Wea
Kevin M 2016/08/19 21:43:33 Done.
+
// BlobChannelSender implementation.
std::vector<BlobChannelSender::CacheStateEntry> GetCachedBlobIds()
const override;
@@ -52,6 +55,10 @@ class BLIMP_NET_EXPORT BlobChannelSenderImpl : public BlobChannelSender {
// delivered, or has been evicted at the receiver.
std::set<BlobId> receiver_cache_contents_;
+ base::ThreadChecker thread_checker_;
Wez 2016/08/19 19:15:50 Doesn't look like you're actually using the thread
Kevin M 2016/08/19 21:43:34 Done.
+
+ base::WeakPtrFactory<BlobChannelSenderImpl> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(BlobChannelSenderImpl);
};

Powered by Google App Engine
This is Rietveld 408576698