| Index: chrome/browser/extensions/api/usb/usb_device_resource.cc
|
| diff --git a/chrome/browser/extensions/api/usb/usb_device_resource.cc b/chrome/browser/extensions/api/usb/usb_device_resource.cc
|
| deleted file mode 100644
|
| index 633635df9387e4b39f0e93c1b80d4bb107691789..0000000000000000000000000000000000000000
|
| --- a/chrome/browser/extensions/api/usb/usb_device_resource.cc
|
| +++ /dev/null
|
| @@ -1,44 +0,0 @@
|
| -// Copyright (c) 2012 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 "chrome/browser/extensions/api/usb/usb_device_resource.h"
|
| -
|
| -#include <string>
|
| -#include <vector>
|
| -
|
| -#include "base/bind.h"
|
| -#include "base/bind_helpers.h"
|
| -#include "base/synchronization/lock.h"
|
| -#include "chrome/common/extensions/api/usb.h"
|
| -#include "components/usb_service/usb_device_handle.h"
|
| -#include "content/public/browser/browser_thread.h"
|
| -#include "extensions/browser/api/api_resource.h"
|
| -
|
| -using content::BrowserThread;
|
| -using usb_service::UsbDeviceHandle;
|
| -
|
| -namespace extensions {
|
| -
|
| -static base::LazyInstance<
|
| - BrowserContextKeyedAPIFactory<ApiResourceManager<UsbDeviceResource> > >
|
| - g_factory = LAZY_INSTANCE_INITIALIZER;
|
| -
|
| -// static
|
| -template <>
|
| -BrowserContextKeyedAPIFactory<ApiResourceManager<UsbDeviceResource> >*
|
| -ApiResourceManager<UsbDeviceResource>::GetFactoryInstance() {
|
| - return g_factory.Pointer();
|
| -}
|
| -
|
| -UsbDeviceResource::UsbDeviceResource(const std::string& owner_extension_id,
|
| - scoped_refptr<UsbDeviceHandle> device)
|
| - : ApiResource(owner_extension_id), device_(device) {}
|
| -
|
| -UsbDeviceResource::~UsbDeviceResource() {
|
| - BrowserThread::PostTask(BrowserThread::FILE,
|
| - FROM_HERE,
|
| - base::Bind(&UsbDeviceHandle::Close, device_));
|
| -}
|
| -
|
| -} // namespace extensions
|
|
|