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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "components/dom_distiller/core/distilled_content_store.h" 5 #include "components/dom_distiller/core/distilled_content_store.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 8
9 namespace dom_distiller { 9 namespace dom_distiller {
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 InMemoryContentStore::CacheDeletor::CacheDeletor(InMemoryContentStore* store) 91 InMemoryContentStore::CacheDeletor::CacheDeletor(InMemoryContentStore* store)
92 : store_(store) { 92 : store_(store) {
93 } 93 }
94 94
95 InMemoryContentStore::CacheDeletor::~CacheDeletor() { 95 InMemoryContentStore::CacheDeletor::~CacheDeletor() {
96 } 96 }
97 97
98 void InMemoryContentStore::CacheDeletor::operator()( 98 void InMemoryContentStore::CacheDeletor::operator()(
99 const DistilledArticleProto& proto) { 99 DistilledArticleProto* proto) {
100 // When InMemoryContentStore is deleted, the |store_| pointer becomes invalid, 100 // When InMemoryContentStore is deleted, the |store_| pointer becomes invalid,
101 // but since the ContentMap is cleared in the InMemoryContentStore destructor, 101 // but since the ContentMap is cleared in the InMemoryContentStore destructor,
102 // this should never be called after the destructor. 102 // this should never be called after the destructor.
103 store_->EraseUrlToIdMapping(proto); 103 store_->EraseUrlToIdMapping(*proto);
104 } 104 }
105 105
106 } // namespace dom_distiller 106 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698