| Index: chrome/browser/autocomplete/shortcuts_backend.h
|
| diff --git a/chrome/browser/autocomplete/shortcuts_backend.h b/chrome/browser/autocomplete/shortcuts_backend.h
|
| index 88d82ddbd92243edf0b0bc1f565ae9e5711c23fa..96d2f7941b7c0709e11ebc49cb1c3ce836eb6ba0 100644
|
| --- a/chrome/browser/autocomplete/shortcuts_backend.h
|
| +++ b/chrome/browser/autocomplete/shortcuts_backend.h
|
| @@ -14,10 +14,12 @@
|
| #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"
|
| #include "chrome/browser/history/shortcuts_database.h"
|
| +#include "components/history/core/browser/history_service_observer.h"
|
| #include "components/keyed_service/core/refcounted_keyed_service.h"
|
| #include "components/omnibox/autocomplete_match.h"
|
| #include "content/public/browser/notification_observer.h"
|
| @@ -33,7 +35,8 @@ class ShortcutsDatabase;
|
| // This class manages the shortcut provider backend - access to database on the
|
| // db thread, etc.
|
| class ShortcutsBackend : public RefcountedKeyedService,
|
| - public content::NotificationObserver {
|
| + public content::NotificationObserver,
|
| + public history::HistoryServiceObserver {
|
| public:
|
| typedef std::multimap<base::string16,
|
| const history::ShortcutsDatabase::Shortcut> ShortcutMap;
|
| @@ -128,6 +131,11 @@ class ShortcutsBackend : public RefcountedKeyedService,
|
| // Deletes all of the shortcuts.
|
| bool DeleteAllShortcuts();
|
|
|
| + // history::HistoryServiceObserver:
|
| + void OnURLsDeleted(
|
| + HistoryService* history_service,
|
| + const history::URLsDeletedDetails& deleted_details) override;
|
| +
|
| Profile* profile_;
|
| CurrentState current_state_;
|
| ObserverList<ShortcutsBackendObserver> observer_list_;
|
| @@ -148,6 +156,9 @@ class ShortcutsBackend : public RefcountedKeyedService,
|
| // For some unit-test only.
|
| bool no_db_access_;
|
|
|
| + ScopedObserver<HistoryService, HistoryServiceObserver>
|
| + history_service_observer_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ShortcutsBackend);
|
| };
|
|
|
|
|