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

Unified Diff: components/dom_distiller/core/distilled_content_store.cc

Issue 983223004: base: Remove non-const refs from the MRUCache implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: components/dom_distiller/core/distilled_content_store.cc
diff --git a/components/dom_distiller/core/distilled_content_store.cc b/components/dom_distiller/core/distilled_content_store.cc
index 11ff967a809905d8a87f9048c8d0c9c344fd5a49..838f9117353041b69717e515c2e3f54e65bb6f00 100644
--- a/components/dom_distiller/core/distilled_content_store.cc
+++ b/components/dom_distiller/core/distilled_content_store.cc
@@ -96,11 +96,11 @@ InMemoryContentStore::CacheDeletor::~CacheDeletor() {
}
void InMemoryContentStore::CacheDeletor::operator()(
- const DistilledArticleProto& proto) {
+ DistilledArticleProto* proto) {
// When InMemoryContentStore is deleted, the |store_| pointer becomes invalid,
// but since the ContentMap is cleared in the InMemoryContentStore destructor,
// this should never be called after the destructor.
- store_->EraseUrlToIdMapping(proto);
+ store_->EraseUrlToIdMapping(*proto);
}
} // namespace dom_distiller

Powered by Google App Engine
This is Rietveld 408576698