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

Side by Side Diff: components/dom_distiller/core/distilled_content_store.cc

Issue 1970833002: Fix include path for moved thread_task_runner_handle.h header in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a1_move_task_runner_handle
Patch Set: merge up to r393009 Created 4 years, 7 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/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 8
9 namespace dom_distiller { 9 namespace dom_distiller {
10 10
11 InMemoryContentStore::InMemoryContentStore(const int max_num_entries) 11 InMemoryContentStore::InMemoryContentStore(const int max_num_entries)
12 : cache_(max_num_entries) {} 12 : cache_(max_num_entries) {}
13 13
14 InMemoryContentStore::~InMemoryContentStore() { 14 InMemoryContentStore::~InMemoryContentStore() {
15 // Clear the cache before destruction to ensure the CacheDeletor is not called 15 // Clear the cache before destruction to ensure the CacheDeletor is not called
16 // after InMemoryContentStore has been destroyed. 16 // after InMemoryContentStore has been destroyed.
17 cache_.Clear(); 17 cache_.Clear();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void InMemoryContentStore::CacheDeletor::operator()( 99 void InMemoryContentStore::CacheDeletor::operator()(
100 DistilledArticleProto* proto) { 100 DistilledArticleProto* proto) {
101 // When InMemoryContentStore is deleted, the |store_| pointer becomes invalid, 101 // When InMemoryContentStore is deleted, the |store_| pointer becomes invalid,
102 // but since the ContentMap is cleared in the InMemoryContentStore destructor, 102 // but since the ContentMap is cleared in the InMemoryContentStore destructor,
103 // this should never be called after the destructor. 103 // this should never be called after the destructor.
104 store_->EraseUrlToIdMapping(*proto); 104 store_->EraseUrlToIdMapping(*proto);
105 delete proto; 105 delete proto;
106 } 106 }
107 107
108 } // namespace dom_distiller 108 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698