| Index: chrome/browser/autocomplete/shortcuts_backend.h
|
| diff --git a/chrome/browser/autocomplete/shortcuts_backend.h b/chrome/browser/autocomplete/shortcuts_backend.h
|
| index 64f3bcc5f6434dd9cf7c8990fe3120b77bcec31b..5729cea26892466adfe783ed94eea01892064267 100644
|
| --- a/chrome/browser/autocomplete/shortcuts_backend.h
|
| +++ b/chrome/browser/autocomplete/shortcuts_backend.h
|
| @@ -14,6 +14,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/observer_list.h"
|
| +#include "base/scoped_observer.h"
|
| #include "base/strings/string16.h"
|
| #include "base/synchronization/lock.h"
|
| #include "base/time/time.h"
|
| @@ -22,10 +23,15 @@
|
| #include "components/keyed_service/content/refcounted_browser_context_keyed_service.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| +#include "extensions/browser/extension_registry_observer.h"
|
| #include "url/gurl.h"
|
|
|
| class Profile;
|
|
|
| +namespace extensions {
|
| +class ExtensionRegistry;
|
| +}
|
| +
|
| namespace history {
|
| class ShortcutsDatabase;
|
| }; // namespace history
|
| @@ -33,7 +39,8 @@ class ShortcutsDatabase;
|
| // This class manages the shortcut provider backend - access to database on the
|
| // db thread, etc.
|
| class ShortcutsBackend : public RefcountedBrowserContextKeyedService,
|
| - public content::NotificationObserver {
|
| + public content::NotificationObserver,
|
| + public extensions::ExtensionRegistryObserver {
|
| public:
|
| typedef std::multimap<base::string16,
|
| const history::ShortcutsDatabase::Shortcut> ShortcutMap;
|
| @@ -104,6 +111,12 @@ class ShortcutsBackend : public RefcountedBrowserContextKeyedService,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) OVERRIDE;
|
|
|
| + // extensions::ExtensionRegistryObserver:
|
| + virtual void OnExtensionUnloaded(
|
| + content::BrowserContext* browser_context,
|
| + const extensions::Extension* extension,
|
| + extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
|
| +
|
| // Internal initialization of the back-end. Posted by Init() to the DB thread.
|
| // On completion posts InitCompleted() back to UI thread.
|
| void InitInternal();
|
| @@ -145,6 +158,10 @@ class ShortcutsBackend : public RefcountedBrowserContextKeyedService,
|
|
|
| content::NotificationRegistrar notification_registrar_;
|
|
|
| + ScopedObserver<extensions::ExtensionRegistry,
|
| + extensions::ExtensionRegistryObserver>
|
| + extension_registry_observer_;
|
| +
|
| // For some unit-test only.
|
| bool no_db_access_;
|
|
|
|
|