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

Side by Side Diff: components/keyed_service/core/refcounted_keyed_service.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/keyed_service/core/refcounted_keyed_service.h" 5 #include "components/keyed_service/core/refcounted_keyed_service.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 9
10 namespace impl { 10 namespace impl {
11 11
12 // static 12 // static
13 void RefcountedKeyedServiceTraits::Destruct(const RefcountedKeyedService* obj) { 13 void RefcountedKeyedServiceTraits::Destruct(const RefcountedKeyedService* obj) {
14 if (obj->task_runner_.get() != nullptr && 14 if (obj->task_runner_.get() != nullptr &&
15 obj->task_runner_.get() != base::ThreadTaskRunnerHandle::Get()) { 15 obj->task_runner_.get() != base::ThreadTaskRunnerHandle::Get()) {
16 obj->task_runner_->DeleteSoon(FROM_HERE, obj); 16 obj->task_runner_->DeleteSoon(FROM_HERE, obj);
17 } else { 17 } else {
18 delete obj; 18 delete obj;
19 } 19 }
20 } 20 }
21 21
22 } // namespace impl 22 } // namespace impl
23 23
24 RefcountedKeyedService::RefcountedKeyedService() : task_runner_(nullptr) { 24 RefcountedKeyedService::RefcountedKeyedService() : task_runner_(nullptr) {
25 } 25 }
26 26
27 RefcountedKeyedService::RefcountedKeyedService( 27 RefcountedKeyedService::RefcountedKeyedService(
28 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) 28 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
29 : task_runner_(task_runner) { 29 : task_runner_(task_runner) {
30 } 30 }
31 31
32 RefcountedKeyedService::~RefcountedKeyedService() { 32 RefcountedKeyedService::~RefcountedKeyedService() {
33 } 33 }
OLDNEW
« no previous file with comments | « components/invalidation/impl/sync_system_resources.cc ('k') | components/metrics/call_stack_profile_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698