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

Side by Side Diff: components/previews/core/previews_io_data.cc

Issue 2333003002: Changed previews component to be a layered component. (Closed)
Patch Set: Rebased on master Created 4 years, 3 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 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
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
OLDNEW
« no previous file with comments | « components/previews/core/previews_io_data.h ('k') | components/previews/core/previews_io_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698