OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/previews/previews_ui_service.h" | 5 #include "components/previews/core/previews_ui_service.h" |
6 | 6 |
7 #include "components/previews/previews_io_data.h" | 7 #include "components/previews/core/previews_io_data.h" |
8 | 8 |
9 namespace previews { | 9 namespace previews { |
10 | 10 |
11 PreviewsUIService::PreviewsUIService( | 11 PreviewsUIService::PreviewsUIService( |
12 PreviewsIOData* previews_io_data, | 12 PreviewsIOData* previews_io_data, |
13 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) | 13 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) |
14 : io_task_runner_(io_task_runner), weak_factory_(this) { | 14 : io_task_runner_(io_task_runner), weak_factory_(this) { |
15 previews_io_data->Initialize(weak_factory_.GetWeakPtr()); | 15 previews_io_data->Initialize(weak_factory_.GetWeakPtr()); |
16 } | 16 } |
17 | 17 |
18 PreviewsUIService::~PreviewsUIService() { | 18 PreviewsUIService::~PreviewsUIService() { |
19 DCHECK(thread_checker_.CalledOnValidThread()); | 19 DCHECK(thread_checker_.CalledOnValidThread()); |
20 } | 20 } |
21 | 21 |
22 void PreviewsUIService::SetIOData(base::WeakPtr<PreviewsIOData> io_data) { | 22 void PreviewsUIService::SetIOData(base::WeakPtr<PreviewsIOData> io_data) { |
23 DCHECK(thread_checker_.CalledOnValidThread()); | 23 DCHECK(thread_checker_.CalledOnValidThread()); |
24 io_data_ = io_data; | 24 io_data_ = io_data; |
25 } | 25 } |
26 | 26 |
27 } // namespace previews | 27 } // namespace previews |
OLD | NEW |