Index: chrome/browser/extensions/api/history/history_api.h |
diff --git a/chrome/browser/extensions/api/history/history_api.h b/chrome/browser/extensions/api/history/history_api.h |
index 9700b1823eb3c9dd6ff9af58073790a53536a33a..9692dba545e84bc4a65d1a3b1c929101682ed637 100644 |
--- a/chrome/browser/extensions/api/history/history_api.h |
+++ b/chrome/browser/extensions/api/history/history_api.h |
@@ -10,11 +10,11 @@ |
#include "base/compiler_specific.h" |
#include "base/memory/linked_ptr.h" |
+#include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
#include "chrome/browser/extensions/event_router.h" |
#include "chrome/browser/extensions/extension_function.h" |
#include "chrome/browser/history/history.h" |
#include "chrome/browser/history/history_notifications.h" |
-#include "chrome/browser/profiles/profile_keyed_service.h" |
#include "chrome/common/cancelable_task_tracker.h" |
#include "chrome/common/extensions/api/history.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -54,7 +54,7 @@ class HistoryEventRouter : public content::NotificationObserver { |
DISALLOW_COPY_AND_ASSIGN(HistoryEventRouter); |
}; |
-class HistoryAPI : public ProfileKeyedService, |
+class HistoryAPI : public ProfileKeyedAPI, |
public EventRouter::Observer { |
public: |
explicit HistoryAPI(Profile* profile); |
@@ -63,12 +63,23 @@ class HistoryAPI : public ProfileKeyedService, |
// ProfileKeyedService implementation. |
virtual void Shutdown() OVERRIDE; |
+ // ProfileKeyedAPI implementation. |
+ static ProfileKeyedAPIFactory<HistoryAPI>* GetFactoryInstance(); |
+ |
// EventRouter::Observer implementation. |
virtual void OnListenerAdded(const EventListenerInfo& details) OVERRIDE; |
private: |
+ friend class ProfileKeyedAPIFactory<HistoryAPI>; |
+ |
Profile* profile_; |
+ // ProfileKeyedAPI implementation. |
+ static const char* service_name() { |
+ return "HistoryAPI"; |
+ } |
+ static const bool kServiceIsNULLWhileTesting = true; |
+ |
// Created lazily upon OnListenerAdded. |
scoped_ptr<HistoryEventRouter> history_event_router_; |
}; |