| Index: chrome/browser/extensions/api/history/history_api.cc
|
| diff --git a/chrome/browser/extensions/api/history/history_api.cc b/chrome/browser/extensions/api/history/history_api.cc
|
| index 06b5fcc4fc968291549084171d99ada8f3c6c36a..a8a0d09adbd276d51c329589aafb5a64bcea9162 100644
|
| --- a/chrome/browser/extensions/api/history/history_api.cc
|
| +++ b/chrome/browser/extensions/api/history/history_api.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/bind_helpers.h"
|
| #include "base/callback.h"
|
| #include "base/json/json_writer.h"
|
| +#include "base/lazy_instance.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop.h"
|
| #include "base/string_number_conversions.h"
|
| @@ -212,6 +213,14 @@ void HistoryAPI::Shutdown() {
|
| ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
|
| }
|
|
|
| +static base::LazyInstance<ProfileKeyedAPIFactory<HistoryAPI> >
|
| +g_factory = LAZY_INSTANCE_INITIALIZER;
|
| +
|
| +// static
|
| +ProfileKeyedAPIFactory<HistoryAPI>* HistoryAPI::GetFactoryInstance() {
|
| + return &g_factory.Get();
|
| +}
|
| +
|
| void HistoryAPI::OnListenerAdded(const EventListenerInfo& details) {
|
| history_event_router_.reset(new HistoryEventRouter(profile_));
|
| ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
|
|
|