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

Unified Diff: device/usb/usb_device.cc

Issue 1034333002: Check USB device path access when prompting users to select a device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Have MockPermissionBrokerClient extend FakePermissionBrokerClient to avoid adding mocks for unrelat… Created 5 years, 9 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
Index: device/usb/usb_device.cc
diff --git a/device/usb/usb_device.cc b/device/usb/usb_device.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4b9ed1e9a6ebf37e0490cb0911ce718ed7370e4a
--- /dev/null
+++ b/device/usb/usb_device.cc
@@ -0,0 +1,26 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "device/usb/usb_device.h"
+
+namespace device {
+
+UsbDevice::UsbDevice(uint16 vendor_id, uint16 product_id, uint32 unique_id)
+ : vendor_id_(vendor_id), product_id_(product_id), unique_id_(unique_id) {
+}
+
+UsbDevice::~UsbDevice() {
+}
+
+void UsbDevice::CheckUsbAccess(const ResultCallback& callback) {
+ callback.Run(true);
+}
+
+// Like CheckUsbAccess but actually changes the ownership of the device node.
+void UsbDevice::RequestUsbAccess(int interface_id,
+ const ResultCallback& callback) {
+ callback.Run(true);
+}
+
+} // namespace device

Powered by Google App Engine
This is Rietveld 408576698