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

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

Issue 178193030: Rename ProfileKeyedAPI to BrowserContextKeyedAPI and GetProfile to Get. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits 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 31c2f1f9f9d160c2fe54421173e4aa82dc9dc96f..3a115ca5dc80790fd223432af150c34056c3eb7d 100644
--- a/chrome/browser/extensions/api/api_resource_manager.h
+++ b/chrome/browser/extensions/api/api_resource_manager.h
@@ -13,13 +13,13 @@
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
#include "chrome/browser/extensions/extension_host.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
+#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/common/extension.h"
namespace extensions {
@@ -59,18 +59,18 @@ namespace extensions {
//
// In the cc file:
//
-// static base::LazyInstance<ProfileKeyedAPIFactory<
+// static base::LazyInstance<BrowserContextKeyedAPIFactory<
// ApiResourceManager<Resource> > >
// g_factory = LAZY_INSTANCE_INITIALIZER;
//
//
// template <>
-// ProfileKeyedAPIFactory<ApiResourceManager<Resource> >*
+// BrowserContextKeyedAPIFactory<ApiResourceManager<Resource> >*
// ApiResourceManager<Resource>::GetFactoryInstance() {
// return g_factory.Pointer();
// }
template <class T>
-class ApiResourceManager : public ProfileKeyedAPI,
+class ApiResourceManager : public BrowserContextKeyedAPI,
public base::NonThreadSafe,
public content::NotificationObserver {
public:
@@ -106,13 +106,13 @@ class ApiResourceManager : public ProfileKeyedAPI,
data_->InititateCleanup();
}
- // ProfileKeyedAPI implementation.
- static ProfileKeyedAPIFactory<ApiResourceManager<T> >* GetFactoryInstance();
+ // BrowserContextKeyedAPI implementation.
+ static BrowserContextKeyedAPIFactory<ApiResourceManager<T> >*
+ GetFactoryInstance();
// Convenience method to get the ApiResourceManager for a profile.
static ApiResourceManager<T>* Get(content::BrowserContext* context) {
- return ProfileKeyedAPIFactory<ApiResourceManager<T> >::GetForProfile(
- context);
+ return BrowserContextKeyedAPIFactory<ApiResourceManager<T> >::Get(context);
}
// Takes ownership.
@@ -158,8 +158,8 @@ class ApiResourceManager : public ProfileKeyedAPI,
friend class api::TCPServerSocketEventDispatcher;
friend class api::TCPSocketEventDispatcher;
friend class api::UDPSocketEventDispatcher;
- friend class ProfileKeyedAPIFactory<ApiResourceManager<T> >;
- // ProfileKeyedAPI implementation.
+ friend class BrowserContextKeyedAPIFactory<ApiResourceManager<T> >;
+ // BrowserContextKeyedAPI implementation.
static const char* service_name() {
return T::service_name();
}
« 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