Index: chrome/browser/extensions/api/bookmarks/bookmark_api.h |
diff --git a/chrome/browser/extensions/api/bookmarks/bookmark_api.h b/chrome/browser/extensions/api/bookmarks/bookmark_api.h |
index c3008246dccba0ace995025dcbf9ac7d16d71f63..902467a7a07c2c0b55d00c051a93ad21f20393a2 100644 |
--- a/chrome/browser/extensions/api/bookmarks/bookmark_api.h |
+++ b/chrome/browser/extensions/api/bookmarks/bookmark_api.h |
@@ -12,9 +12,9 @@ |
#include "base/compiler_specific.h" |
#include "base/memory/ref_counted.h" |
#include "chrome/browser/bookmarks/bookmark_model_observer.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/profiles/profile_keyed_service.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "ui/base/dialogs/select_file_dialog.h" |
@@ -69,7 +69,7 @@ class BookmarkEventRouter : public BookmarkModelObserver { |
DISALLOW_COPY_AND_ASSIGN(BookmarkEventRouter); |
}; |
-class BookmarkAPI : public ProfileKeyedService, |
+class BookmarkAPI : public ProfileKeyedAPI, |
public EventRouter::Observer { |
public: |
explicit BookmarkAPI(Profile* profile); |
@@ -78,13 +78,24 @@ class BookmarkAPI : public ProfileKeyedService, |
// ProfileKeyedService implementation. |
virtual void Shutdown() OVERRIDE; |
+ // ProfileKeyedAPI implementation. |
+ static ProfileKeyedAPIFactory<BookmarkAPI>* GetFactoryInstance(); |
+ |
// EventRouter::Observer implementation. |
virtual void OnListenerAdded(const EventListenerInfo& details) |
OVERRIDE; |
private: |
+ friend class ProfileKeyedAPIFactory<BookmarkAPI>; |
+ |
Profile* profile_; |
+ // ProfileKeyedAPI implementation. |
+ static const char* service_name() { |
+ return "BookmarkAPI"; |
+ } |
+ static const bool kServiceIsNULLWhileTesting = true; |
+ |
// Created lazily upon OnListenerAdded. |
scoped_ptr<BookmarkEventRouter> bookmark_event_router_; |
}; |