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

Unified Diff: chrome/browser/usb/usb_interface.cc

Issue 16316004: Separate usb device handle from usb device. (deprecate) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the threading mess Created 7 years, 6 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 | « chrome/browser/usb/usb_interface.h ('k') | chrome/browser/usb/usb_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/usb/usb_interface.cc
diff --git a/chrome/browser/usb/usb_interface.cc b/chrome/browser/usb/usb_interface.cc
index b3ff83c549d7044c892fa2cac7b335f2090d85b7..77f2865170dfddb8f5916ac8311ae4083e41b716 100644
--- a/chrome/browser/usb/usb_interface.cc
+++ b/chrome/browser/usb/usb_interface.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 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.
@@ -10,8 +10,7 @@
UsbEndpointDescriptor::UsbEndpointDescriptor(
scoped_refptr<const UsbConfigDescriptor> config,
PlatformUsbEndpointDescriptor descriptor)
- : config_(config), descriptor_(descriptor) {
-}
+ : config_(config), descriptor_(descriptor) {}
UsbEndpointDescriptor::~UsbEndpointDescriptor() {}
@@ -88,8 +87,7 @@ int UsbEndpointDescriptor::GetPollingInterval() const {
UsbInterfaceDescriptor::UsbInterfaceDescriptor(
scoped_refptr<const UsbConfigDescriptor> config,
PlatformUsbInterfaceDescriptor descriptor)
- : config_(config), descriptor_(descriptor) {
-}
+ : config_(config), descriptor_(descriptor) {}
UsbInterfaceDescriptor::~UsbInterfaceDescriptor() {}
@@ -97,10 +95,10 @@ size_t UsbInterfaceDescriptor::GetNumEndpoints() const {
return descriptor_->bNumEndpoints;
}
-scoped_refptr<const UsbEndpointDescriptor>
- UsbInterfaceDescriptor::GetEndpoint(size_t index) const {
- return make_scoped_refptr(new UsbEndpointDescriptor(config_,
- &descriptor_->endpoint[index]));
+scoped_refptr<const UsbEndpointDescriptor> UsbInterfaceDescriptor::GetEndpoint(
+ size_t index) const {
+ return make_scoped_refptr(
+ new UsbEndpointDescriptor(config_, &descriptor_->endpoint[index]));
}
int UsbInterfaceDescriptor::GetInterfaceNumber() const {
@@ -124,9 +122,8 @@ int UsbInterfaceDescriptor::GetInterfaceProtocol() const {
}
UsbInterface::UsbInterface(scoped_refptr<const UsbConfigDescriptor> config,
- PlatformUsbInterface usbInterface)
- : config_(config), interface_(usbInterface) {
-}
+ PlatformUsbInterface usbInterface)
+ : config_(config), interface_(usbInterface) {}
UsbInterface::~UsbInterface() {}
@@ -134,15 +131,13 @@ size_t UsbInterface::GetNumAltSettings() const {
return interface_->num_altsetting;
}
-scoped_refptr<const UsbInterfaceDescriptor>
- UsbInterface::GetAltSetting(size_t index) const {
- return make_scoped_refptr(new UsbInterfaceDescriptor(config_,
- &interface_->altsetting[index]));
+scoped_refptr<const UsbInterfaceDescriptor> UsbInterface::GetAltSetting(
+ size_t index) const {
+ return make_scoped_refptr(
+ new UsbInterfaceDescriptor(config_, &interface_->altsetting[index]));
}
-UsbConfigDescriptor::UsbConfigDescriptor()
- : config_(NULL) {
-}
+UsbConfigDescriptor::UsbConfigDescriptor() : config_(NULL) {}
UsbConfigDescriptor::~UsbConfigDescriptor() {
if (config_ != NULL) {
@@ -159,8 +154,8 @@ size_t UsbConfigDescriptor::GetNumInterfaces() const {
return config_->bNumInterfaces;
}
-scoped_refptr<const UsbInterface>
- UsbConfigDescriptor::GetInterface(size_t index) const {
- return make_scoped_refptr(new UsbInterface(make_scoped_refptr(this),
- &config_->interface[index]));
+scoped_refptr<const UsbInterface> UsbConfigDescriptor::GetInterface(
+ size_t index) const {
+ return make_scoped_refptr(
+ new UsbInterface(make_scoped_refptr(this), &config_->interface[index]));
}
« no previous file with comments | « chrome/browser/usb/usb_interface.h ('k') | chrome/browser/usb/usb_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698