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

Unified Diff: chrome/browser/extensions/api/api_resource_manager.h

Issue 171813010: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 1). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: browser_context_ 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/api_resource_manager.h
diff --git a/chrome/browser/extensions/api/api_resource_manager.h b/chrome/browser/extensions/api/api_resource_manager.h
index 9fbf1a7d3054a8a7c4305acbea0b7d69bc84dd62..6d3008a987d689ae5c8f05c1f2f1bfcda0109e4a 100644
--- a/chrome/browser/extensions/api/api_resource_manager.h
+++ b/chrome/browser/extensions/api/api_resource_manager.h
@@ -74,9 +74,8 @@ class ApiResourceManager : public ProfileKeyedAPI,
public base::NonThreadSafe,
public content::NotificationObserver {
public:
- explicit ApiResourceManager(Profile* profile)
- : thread_id_(T::kThreadId),
- data_(new ApiResourceData(thread_id_)) {
+ explicit ApiResourceManager(content::BrowserContext* context)
+ : thread_id_(T::kThreadId), data_(new ApiResourceData(thread_id_)) {
registrar_.Add(
this,
chrome::NOTIFICATION_EXTENSION_UNLOADED,
@@ -111,9 +110,9 @@ class ApiResourceManager : public ProfileKeyedAPI,
static ProfileKeyedAPIFactory<ApiResourceManager<T> >* GetFactoryInstance();
// Convenience method to get the ApiResourceManager for a profile.
- static ApiResourceManager<T>* Get(Profile* profile) {
+ static ApiResourceManager<T>* Get(content::BrowserContext* context) {
return ProfileKeyedAPIFactory<ApiResourceManager<T> >::GetForProfile(
- profile);
+ context);
}
// Takes ownership.
« no previous file with comments | « chrome/browser/extensions/api/alarms/alarm_manager.cc ('k') | chrome/browser/extensions/api/audio/audio_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698