| 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_io_data.h" | 5 #include "components/previews/core/previews_io_data.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "components/previews/previews_ui_service.h" | 9 #include "components/previews/core/previews_ui_service.h" |
| 10 | 10 |
| 11 namespace previews { | 11 namespace previews { |
| 12 | 12 |
| 13 PreviewsIOData::PreviewsIOData( | 13 PreviewsIOData::PreviewsIOData( |
| 14 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner, | 14 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner, |
| 15 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) | 15 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) |
| 16 : ui_task_runner_(ui_task_runner), | 16 : ui_task_runner_(ui_task_runner), |
| 17 io_task_runner_(io_task_runner), | 17 io_task_runner_(io_task_runner), |
| 18 weak_factory_(this) {} | 18 weak_factory_(this) {} |
| 19 | 19 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 void PreviewsIOData::InitializeOnIOThread() { | 33 void PreviewsIOData::InitializeOnIOThread() { |
| 34 DCHECK(io_task_runner_->BelongsToCurrentThread()); | 34 DCHECK(io_task_runner_->BelongsToCurrentThread()); |
| 35 ui_task_runner_->PostTask( | 35 ui_task_runner_->PostTask( |
| 36 FROM_HERE, base::Bind(&PreviewsUIService::SetIOData, previews_ui_service_, | 36 FROM_HERE, base::Bind(&PreviewsUIService::SetIOData, previews_ui_service_, |
| 37 weak_factory_.GetWeakPtr())); | 37 weak_factory_.GetWeakPtr())); |
| 38 } | 38 } |
| 39 | 39 |
| 40 } // namespace previews | 40 } // namespace previews |
| OLD | NEW |