summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/processes
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-05 10:21:02 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-05 10:21:02 +0000
commit4bf3bed0a6c27a4df48fb4fd6fcf0ae6082895a0 (patch)
treed251d2f21fa175b96f756d3e9176d4dafd076b1d /chrome/browser/extensions/api/processes
parent4620763147961c9a7587b7c27b161c0c8136bceb (diff)
downloadchromium_src-4bf3bed0a6c27a4df48fb4fd6fcf0ae6082895a0.zip
chromium_src-4bf3bed0a6c27a4df48fb4fd6fcf0ae6082895a0.tar.gz
chromium_src-4bf3bed0a6c27a4df48fb4fd6fcf0ae6082895a0.tar.bz2
Rename ProfileKeyedAPI to BrowserContextKeyedAPI and GetProfile to Get.
Move it to extensions/browser. (Not extensions/browser/api, since it's now being used not just by API implementations.) This change is purely mechanical (some lines are more affected by clang-format than others). BUG=309909 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/178193030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/processes')
-rw-r--r--chrome/browser/extensions/api/processes/processes_api.cc9
-rw-r--r--chrome/browser/extensions/api/processes/processes_api.h12
2 files changed, 11 insertions, 10 deletions
diff --git a/chrome/browser/extensions/api/processes/processes_api.cc b/chrome/browser/extensions/api/processes/processes_api.cc
index c450f03..6e385ce 100644
--- a/chrome/browser/extensions/api/processes/processes_api.cc
+++ b/chrome/browser/extensions/api/processes/processes_api.cc
@@ -508,17 +508,18 @@ void ProcessesAPI::Shutdown() {
this);
}
-static base::LazyInstance<ProfileKeyedAPIFactory<ProcessesAPI> >
-g_factory = LAZY_INSTANCE_INITIALIZER;
+static base::LazyInstance<BrowserContextKeyedAPIFactory<ProcessesAPI> >
+ g_factory = LAZY_INSTANCE_INITIALIZER;
// static
-ProfileKeyedAPIFactory<ProcessesAPI>* ProcessesAPI::GetFactoryInstance() {
+BrowserContextKeyedAPIFactory<ProcessesAPI>*
+ProcessesAPI::GetFactoryInstance() {
return g_factory.Pointer();
}
// static
ProcessesAPI* ProcessesAPI::Get(content::BrowserContext* context) {
- return ProfileKeyedAPIFactory<ProcessesAPI>::GetForProfile(context);
+ return BrowserContextKeyedAPIFactory<ProcessesAPI>::Get(context);
}
ProcessesEventRouter* ProcessesAPI::processes_event_router() {
diff --git a/chrome/browser/extensions/api/processes/processes_api.h b/chrome/browser/extensions/api/processes/processes_api.h
index 0bc67b4..d7859d0 100644
--- a/chrome/browser/extensions/api/processes/processes_api.h
+++ b/chrome/browser/extensions/api/processes/processes_api.h
@@ -9,13 +9,13 @@
#include <string>
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
#include "chrome/browser/extensions/chrome_extension_function.h"
#include "chrome/browser/task_manager/task_manager.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_widget_host.h"
+#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/event_router.h"
namespace base {
@@ -94,7 +94,7 @@ class ProcessesEventRouter : public TaskManagerModelObserver,
};
// The profile-keyed service that manages the processes extension API.
-class ProcessesAPI : public ProfileKeyedAPI,
+class ProcessesAPI : public BrowserContextKeyedAPI,
public EventRouter::Observer {
public:
explicit ProcessesAPI(content::BrowserContext* context);
@@ -103,8 +103,8 @@ class ProcessesAPI : public ProfileKeyedAPI,
// BrowserContextKeyedService implementation.
virtual void Shutdown() OVERRIDE;
- // ProfileKeyedAPI implementation.
- static ProfileKeyedAPIFactory<ProcessesAPI>* GetFactoryInstance();
+ // BrowserContextKeyedAPI implementation.
+ static BrowserContextKeyedAPIFactory<ProcessesAPI>* GetFactoryInstance();
// Convenience method to get the ProcessesAPI for a profile.
static ProcessesAPI* Get(content::BrowserContext* context);
@@ -116,11 +116,11 @@ class ProcessesAPI : public ProfileKeyedAPI,
virtual void OnListenerRemoved(const EventListenerInfo& details) OVERRIDE;
private:
- friend class ProfileKeyedAPIFactory<ProcessesAPI>;
+ friend class BrowserContextKeyedAPIFactory<ProcessesAPI>;
content::BrowserContext* browser_context_;
- // ProfileKeyedAPI implementation.
+ // BrowserContextKeyedAPI implementation.
static const char* service_name() {
return "ProcessesAPI";
}