| 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";
|
| }
|
|
|