From 659be688fc57bccd965cb8f7a7e6b3f7f248b9a7 Mon Sep 17 00:00:00 2001 From: "rockot@chromium.org" Date: Fri, 28 Feb 2014 15:06:45 +0000 Subject: Pull AsyncApiFunction out of src/chrome AsyncApiFunction now inherits UIThreadExtensionFunction directly, rather than depending on ChromeAsyncExtensionFunction. It's also been moved from chrome/browser/extensions/api/api_function.{h,cc} to extensions/browser/api/async_api_function.{h,cc}. With the exception of notifications API functions, anything which previously depended on AsyncApiFunction's inheritance of ChromeAsyncExtensionFunction was doing so only for GetProfile. In all cases, GetProfile() has been replaced with ExtensionFunction::browser_context() (renamed from context()). Finally, ApiFunction has been removed since it was identical to ChromeAsyncExtensionFunction. BUG=346949 TBR=dmazzoni@chromium.org,mfoltz@chromium.org,fgorski@chromium.org,courage@chromium.org,dewittj@chromium.org,rpaquay@chromium.org,kalman@chromium.org Review URL: https://codereview.chromium.org/177003015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254113 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/api/usb/usb_api.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'chrome/browser/extensions/api/usb/usb_api.cc') diff --git a/chrome/browser/extensions/api/usb/usb_api.cc b/chrome/browser/extensions/api/usb/usb_api.cc index 84474e4..4d2e46e 100644 --- a/chrome/browser/extensions/api/usb/usb_api.cc +++ b/chrome/browser/extensions/api/usb/usb_api.cc @@ -10,7 +10,6 @@ #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop_proxy.h" #include "chrome/browser/extensions/api/usb/usb_device_resource.h" -#include "chrome/browser/profiles/profile.h" #include "chrome/browser/usb/usb_device_handle.h" #include "chrome/browser/usb/usb_service.h" #include "chrome/common/extensions/api/usb.h" @@ -396,7 +395,7 @@ UsbAsyncApiFunction::~UsbAsyncApiFunction() { } bool UsbAsyncApiFunction::PrePrepare() { - manager_ = ApiResourceManager::Get(GetProfile()); + manager_ = ApiResourceManager::Get(browser_context()); set_work_thread_id(BrowserThread::FILE); return manager_ != NULL; } -- cgit v1.1