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

Side by Side Diff: components/previews/core/previews_ui_service.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_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
OLDNEW
« no previous file with comments | « components/previews/core/previews_ui_service.h ('k') | components/previews/core/previews_ui_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698