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

Side by Side Diff: services/device/device_service.cc

Issue 2608163003: Change single-interface mojo bindings to use SequencedTaskRunner. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « services/device/device_service.h ('k') | services/file/file_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "services/device/device_service.h" 5 #include "services/device/device_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 11 #include "base/threading/thread_task_runner_handle.h"
11 #include "device/power_monitor/power_monitor_message_broadcaster.h" 12 #include "device/power_monitor/power_monitor_message_broadcaster.h"
12 #include "device/time_zone_monitor/time_zone_monitor.h" 13 #include "device/time_zone_monitor/time_zone_monitor.h"
13 #include "services/service_manager/public/cpp/connection.h" 14 #include "services/service_manager/public/cpp/connection.h"
14 #include "services/service_manager/public/cpp/interface_registry.h" 15 #include "services/service_manager/public/cpp/interface_registry.h"
15 16
16 namespace device { 17 namespace device {
17 18
18 std::unique_ptr<service_manager::Service> CreateDeviceService( 19 std::unique_ptr<service_manager::Service> CreateDeviceService(
19 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) { 20 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) {
(...skipping 21 matching lines...) Expand all
41 } 42 }
42 43
43 void DeviceService::Create(const service_manager::Identity& remote_identity, 44 void DeviceService::Create(const service_manager::Identity& remote_identity,
44 mojom::TimeZoneMonitorRequest request) { 45 mojom::TimeZoneMonitorRequest request) {
45 if (!time_zone_monitor_) 46 if (!time_zone_monitor_)
46 time_zone_monitor_ = device::TimeZoneMonitor::Create(file_task_runner_); 47 time_zone_monitor_ = device::TimeZoneMonitor::Create(file_task_runner_);
47 time_zone_monitor_->Bind(std::move(request)); 48 time_zone_monitor_->Bind(std::move(request));
48 } 49 }
49 50
50 } // namespace device 51 } // namespace device
OLDNEW
« no previous file with comments | « services/device/device_service.h ('k') | services/file/file_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698