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

Unified Diff: blimp/common/blob_cache/in_memory_blob_cache.cc

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: Mojo mapz 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/common/blob_cache/in_memory_blob_cache.cc
diff --git a/blimp/common/blob_cache/in_memory_blob_cache.cc b/blimp/common/blob_cache/in_memory_blob_cache.cc
index bad46df059937c7849f89da6a897de8e93114612..55718ba59a39cc38efb86006f8cff939cd95dc3f 100644
--- a/blimp/common/blob_cache/in_memory_blob_cache.cc
+++ b/blimp/common/blob_cache/in_memory_blob_cache.cc
@@ -12,6 +12,14 @@ InMemoryBlobCache::InMemoryBlobCache() {}
InMemoryBlobCache::~InMemoryBlobCache() {}
+std::vector<BlobId> InMemoryBlobCache::GetCachedBlobIds() const {
+ std::vector<BlobId> output;
Wez 2016/07/01 00:30:20 nit: Suggest cached_ids.
Kevin M 2016/07/18 16:58:16 Done.
+ for (const auto& pair : cache_) {
Wez 2016/07/01 00:30:20 nit: Suggest blob_id_and_data_pair for clarity (si
Kevin M 2016/07/18 16:58:16 Done.
+ output.push_back(pair.first);
+ }
+ return output;
+}
+
void InMemoryBlobCache::Put(const BlobId& id, BlobDataPtr data) {
if (Contains(id)) {
// In cases where the engine has miscalculated what is already available

Powered by Google App Engine
This is Rietveld 408576698