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

Unified Diff: blimp/engine/renderer/blob_channel_sender_proxy.h

Issue 2056993003: Add Mojo IPC for seeding new Renderer with Browser's cached blob state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blobchannel-master
Patch Set: use a better upstream branch for the patch Created 4 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 side-by-side diff with in-line comments
Download patch
Index: blimp/engine/renderer/blob_channel_sender_proxy.h
diff --git a/blimp/engine/renderer/blob_channel_sender_proxy.h b/blimp/engine/renderer/blob_channel_sender_proxy.h
index e219ef06c35e7ff5fda51bed6f00343a4bd8ceb7..2a7b7e1331f8c057630d7b6b492390cbcb3b91a5 100644
--- a/blimp/engine/renderer/blob_channel_sender_proxy.h
+++ b/blimp/engine/renderer/blob_channel_sender_proxy.h
@@ -7,8 +7,10 @@
#include <memory>
#include <string>
+#include <vector>
#include "base/containers/hash_tables.h"
+#include "base/memory/weak_ptr.h"
#include "blimp/common/blimp_common_export.h"
#include "blimp/engine/mojo/blob_channel.mojom.h"
#include "blimp/net/blob_channel/blob_channel_sender.h"
@@ -30,10 +32,13 @@ class BLIMP_COMMON_EXPORT BlobChannelSenderProxy : public BlobChannelSender {
bool IsInClientCache(const std::string& id) const;
// BlobChannelSender implementation.
+ std::vector<CacheState> GetCacheState() const override;
void PutBlob(const BlobId& id, BlobDataPtr data) override;
void DeliverBlob(const BlobId& id) override;
private:
+ void GotCacheState(mojo::Array<mojom::CacheStateEntryPtr> cache_state);
Wez 2016/06/21 00:33:33 nit: OnGetCacheStateComplete()?
Kevin M 2016/06/21 21:23:52 Done.
+
// BlobChannel Mojo IPC stub, used for delivering blobs to the browser
// process.
mojom::BlobChannelPtr blob_channel_;
@@ -43,6 +48,8 @@ class BLIMP_COMMON_EXPORT BlobChannelSenderProxy : public BlobChannelSender {
// image encoding and transferral if the content is already in the system.
base::hash_map<std::string, bool> replication_state_;
+ base::WeakPtrFactory<BlobChannelSenderProxy> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(BlobChannelSenderProxy);
};

Powered by Google App Engine
This is Rietveld 408576698