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

Unified Diff: components/usb_service/usb_service.h

Issue 236203019: Move UsbService to its own component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move usb_service component symbols into usb_service namespace Created 6 years, 8 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 | « components/usb_service/usb_interface.cc ('k') | components/usb_service/usb_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/usb_service/usb_service.h
diff --git a/chrome/browser/usb/usb_service.h b/components/usb_service/usb_service.h
similarity index 82%
rename from chrome/browser/usb/usb_service.h
rename to components/usb_service/usb_service.h
index c83ed5b46e83fb75c6a96fad77670513394a13ff..2bbcd0f010542abf92dec0e458beee8fc3da952b 100644
--- a/chrome/browser/usb/usb_service.h
+++ b/components/usb_service/usb_service.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_USB_USB_SERVICE_H_
-#define CHROME_BROWSER_USB_USB_SERVICE_H_
+#ifndef COMPONENTS_USB_SERVICE_USB_SERVICE_H_
+#define COMPONENTS_USB_SERVICE_USB_SERVICE_H_
#include <map>
#include <utility>
@@ -14,6 +14,12 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/threading/non_thread_safe.h"
+#include "components/usb_service/usb_service_export.h"
+
+struct libusb_device;
+struct libusb_context;
+
+namespace usb_service {
typedef struct libusb_device* PlatformUsbDevice;
typedef struct libusb_context* PlatformUsbContext;
@@ -25,8 +31,9 @@ class UsbDevice;
// used to manage and dispatch USB events. It is also responsible for device
// discovery on the system, which allows it to re-use device handles to prevent
// competition for the same USB device.
-class UsbService : public base::MessageLoop::DestructionObserver,
- public base::NonThreadSafe {
+class USB_SERVICE_EXPORT UsbService
+ : public base::MessageLoop::DestructionObserver,
+ public base::NonThreadSafe {
public:
typedef scoped_ptr<std::vector<scoped_refptr<UsbDevice> > >
ScopedDeviceVector;
@@ -66,4 +73,6 @@ class UsbService : public base::MessageLoop::DestructionObserver,
DISALLOW_COPY_AND_ASSIGN(UsbService);
};
-#endif // CHROME_BROWSER_USB_USB_SERVICE_H_
+} // namespace usb_service
+
+#endif // COMPONENTS_USB_SERVICE_USB_SERVICE_H_
« no previous file with comments | « components/usb_service/usb_interface.cc ('k') | components/usb_service/usb_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698