diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-28 21:19:23 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-28 21:19:23 +0000 |
commit | 21a40087a57e13cc9b81cb7e8064f74587dfa8a1 (patch) | |
tree | e88d44c64fcaa47a5b45533a4d6c993de770757c /chrome/browser/extensions/api/location/location_api.cc | |
parent | 0f75118d4799a7c5421150826eaccd1dfd253f8e (diff) | |
download | chromium_src-21a40087a57e13cc9b81cb7e8064f74587dfa8a1.zip chromium_src-21a40087a57e13cc9b81cb7e8064f74587dfa8a1.tar.gz chromium_src-21a40087a57e13cc9b81cb7e8064f74587dfa8a1.tar.bz2 |
Remove Profile dependency from ExtensionFunction
This instead creates new variants of ExtensionFunction for Chrome APIs,
which need Profile, and uses them for any API that needs to access
Profiles.
TBR=sky@chromium.org
BUG=297942
Review URL: https://codereview.chromium.org/35893010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/location/location_api.cc')
-rw-r--r-- | chrome/browser/extensions/api/location/location_api.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/extensions/api/location/location_api.cc b/chrome/browser/extensions/api/location/location_api.cc index 41a9917..cc17f70 100644 --- a/chrome/browser/extensions/api/location/location_api.cc +++ b/chrome/browser/extensions/api/location/location_api.cc @@ -48,11 +48,11 @@ bool LocationWatchLocationFunction::RunImpl() { } // TODO(vadimt): validate and use params->request_info.maximumAge - LocationManager::Get(profile())->AddLocationRequest( - extension_id(), - params->name, - min_distance_in_meters, - min_time_in_milliseconds); + LocationManager::Get(GetProfile()) + ->AddLocationRequest(extension_id(), + params->name, + min_distance_in_meters, + min_time_in_milliseconds); return true; } @@ -62,8 +62,8 @@ bool LocationClearWatchFunction::RunImpl() { ClearWatch::Params::Create(*args_)); EXTENSION_FUNCTION_VALIDATE(params.get()); - LocationManager::Get(profile())->RemoveLocationRequest( - extension_id(), params->name); + LocationManager::Get(GetProfile()) + ->RemoveLocationRequest(extension_id(), params->name); return true; } |