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

Unified Diff: chrome/browser/extensions/api/alarms/alarm_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/alarms/alarm_manager.h
diff --git a/chrome/browser/extensions/api/alarms/alarm_manager.h b/chrome/browser/extensions/api/alarms/alarm_manager.h
index d4d50578fe1daee4cd9f42333290c13232a16bed..04515f10a2b941a6c40fe3b8d2a73fc863be1a86 100644
--- a/chrome/browser/extensions/api/alarms/alarm_manager.h
+++ b/chrome/browser/extensions/api/alarms/alarm_manager.h
@@ -13,10 +13,10 @@
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
-#include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
#include "chrome/common/extensions/api/alarms.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/extension_function.h"
class Profile;
@@ -55,10 +55,9 @@ struct Alarm {
// Manages the currently pending alarms for every extension in a profile.
// There is one manager per virtual Profile.
-class AlarmManager
- : public ProfileKeyedAPI,
- public content::NotificationObserver,
- public base::SupportsWeakPtr<AlarmManager> {
+class AlarmManager : public BrowserContextKeyedAPI,
+ public content::NotificationObserver,
+ public base::SupportsWeakPtr<AlarmManager> {
public:
typedef std::vector<Alarm> AlarmList;
@@ -112,8 +111,8 @@ class AlarmManager
// Replaces AlarmManager's owned clock with |clock| and takes ownership of it.
void SetClockForTesting(base::Clock* clock);
- // ProfileKeyedAPI implementation.
- static ProfileKeyedAPIFactory<AlarmManager>* GetFactoryInstance();
+ // BrowserContextKeyedAPI implementation.
+ static BrowserContextKeyedAPIFactory<AlarmManager>* GetFactoryInstance();
// Convenience method to get the AlarmManager for a profile.
static AlarmManager* Get(Profile* profile);
@@ -130,7 +129,7 @@ class AlarmManager
DifferentMinimumGranularities);
FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest,
RepeatingAlarmsScheduledPredictably);
- friend class ProfileKeyedAPIFactory<AlarmManager>;
+ friend class BrowserContextKeyedAPIFactory<AlarmManager>;
typedef std::string ExtensionId;
typedef std::map<ExtensionId, AlarmList> AlarmMap;
@@ -209,7 +208,7 @@ class AlarmManager
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // ProfileKeyedAPI implementation.
+ // BrowserContextKeyedAPI implementation.
static const char* service_name() {
return "AlarmManager";
}

Powered by Google App Engine
This is Rietveld 408576698