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

Unified Diff: chrome/browser/extensions/api/location/location_manager.cc

Issue 166053003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: | Created 6 years, 10 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
Index: chrome/browser/extensions/api/location/location_manager.cc
diff --git a/chrome/browser/extensions/api/location/location_manager.cc b/chrome/browser/extensions/api/location/location_manager.cc
index 28d2ead0568ff8ff33def2cc81da7a3f25cd1637..d9dedaaf6ef4b3a2948ab56b3a7b4f7a37aefc3b 100644
--- a/chrome/browser/extensions/api/location/location_manager.cc
+++ b/chrome/browser/extensions/api/location/location_manager.cc
@@ -11,6 +11,7 @@
#include "base/lazy_instance.h"
#include "base/time/time.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/location.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/geolocation_provider.h"
@@ -296,8 +297,8 @@ void LocationRequest::OnPositionReported(const content::Geoposition& position) {
}
}
-LocationManager::LocationManager(Profile* profile)
- : profile_(profile) {
+LocationManager::LocationManager(content::BrowserContext* context)
+ : profile_(Profile::FromBrowserContext(context)) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
@@ -438,8 +439,8 @@ ProfileKeyedAPIFactory<LocationManager>* LocationManager::GetFactoryInstance() {
}
// static
-LocationManager* LocationManager::Get(Profile* profile) {
- return ProfileKeyedAPIFactory<LocationManager>::GetForProfile(profile);
+LocationManager* LocationManager::Get(content::BrowserContext* context) {
+ return ProfileKeyedAPIFactory<LocationManager>::GetForProfile(context);
}
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/location/location_manager.h ('k') | chrome/browser/extensions/api/log_private/log_private_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698