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

Unified Diff: device/devices_app/devices_app.cc

Issue 1371793004: Provide the DeviceManager service to the renderer directly, no app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface_permission
Patch Set: Fix chrome_browser.gypi. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/devices_app/devices_app.h ('k') | device/devices_app/public/cpp/devices_app_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/devices_app/devices_app.cc
diff --git a/device/devices_app/devices_app.cc b/device/devices_app/devices_app.cc
index 599c64fce1a4630cb940eaefc38b9ca9dddfde31..134948d9c9229b956ade92efb9f0ea6f29f17476 100644
--- a/device/devices_app/devices_app.cc
+++ b/device/devices_app/devices_app.cc
@@ -72,22 +72,15 @@ class DevicesApp::USBServiceInitializer {
DISALLOW_COPY_AND_ASSIGN(USBServiceInitializer);
};
-DevicesApp::DevicesApp(
- scoped_refptr<base::SequencedTaskRunner> service_task_runner)
- : app_impl_(nullptr),
- service_task_runner_(service_task_runner),
- active_device_manager_count_(0) {
-}
+DevicesApp::DevicesApp()
+ : app_impl_(nullptr), active_device_manager_count_(0) {}
DevicesApp::~DevicesApp() {
}
void DevicesApp::Initialize(mojo::ApplicationImpl* app) {
app_impl_ = app;
- if (!service_task_runner_) {
- service_initializer_.reset(new USBServiceInitializer);
- service_task_runner_ = base::ThreadTaskRunnerHandle::Get();
- }
+ service_initializer_.reset(new USBServiceInitializer);
StartIdleTimer();
}
@@ -110,8 +103,8 @@ void DevicesApp::Create(mojo::ApplicationConnection* connection,
connection->ConnectToService(&permission_provider);
// Owned by its message pipe.
- usb::DeviceManagerImpl* device_manager = new usb::DeviceManagerImpl(
- request.Pass(), permission_provider.Pass(), service_task_runner_);
+ usb::DeviceManagerImpl* device_manager =
+ new usb::DeviceManagerImpl(permission_provider.Pass(), request.Pass());
device_manager->set_connection_error_handler(
base::Bind(&DevicesApp::OnConnectionError, base::Unretained(this)));
« no previous file with comments | « device/devices_app/devices_app.h ('k') | device/devices_app/public/cpp/devices_app_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698