Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: chrome/browser/history/in_memory_url_index.h

Issue 773103004: Remove NOTIFICATION_HISTORY_URLS_DELETED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove NotificationObserver from InMemoryURLIndex Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/in_memory_url_index.h
diff --git a/chrome/browser/history/in_memory_url_index.h b/chrome/browser/history/in_memory_url_index.h
index 12b4ceef5d5fc729ff9c6397ac95e9b896e4c2ed..e6064b3240851149985f80ab32466b510aa3ffd6 100644
--- a/chrome/browser/history/in_memory_url_index.h
+++ b/chrome/browser/history/in_memory_url_index.h
@@ -24,8 +24,6 @@
#include "chrome/browser/history/scored_history_match.h"
#include "components/history/core/browser/history_service_observer.h"
#include "components/history/core/browser/history_types.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
#include "sql/connection.h"
class HistoryService;
@@ -70,7 +68,6 @@ struct URLsModifiedDetails;
// is being searched on and which character occurs as the second char16 of a
// multi-char16 instance.
class InMemoryURLIndex : public HistoryServiceObserver,
- public content::NotificationObserver,
public base::SupportsWeakPtr<InMemoryURLIndex> {
public:
// Defines an abstract class which is notified upon completion of restoring
@@ -151,6 +148,7 @@ class InMemoryURLIndex : public HistoryServiceObserver,
friend class ::HistoryQuickProviderTest;
friend class InMemoryURLIndexTest;
friend class InMemoryURLIndexCacheTest;
+ FRIEND_TEST_ALL_PREFIXES(InMemoryURLIndexTest, ExpireRow);
FRIEND_TEST_ALL_PREFIXES(LimitedInMemoryURLIndexTest, Initialization);
// Creating one of me without a history path is not allowed (tests excepted).
@@ -235,11 +233,6 @@ class InMemoryURLIndex : public HistoryServiceObserver,
// |succeeded| is true on a successful save.
void OnCacheSaveDone(bool succeeded);
- // Handles notifications of history changes.
- void Observe(int notification_type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
-
// HistoryServiceObserver:
void OnURLVisited(HistoryService* history_service,
ui::PageTransition transition,
@@ -248,11 +241,11 @@ class InMemoryURLIndex : public HistoryServiceObserver,
base::Time visit_time) override;
void OnURLsModified(HistoryService* history_service,
const URLRows& changed_urls) override;
+ void OnURLsDeleted(
+ HistoryService* history_service,
+ const history::URLsDeletedDetails& deleted_details) override;
void OnHistoryServiceLoaded(HistoryService* history_service) override;
- // Notification handlers.
- void OnURLsDeleted(const URLsDeletedDetails* details);
-
// Sets the directory wherein the cache file will be maintained.
// For unit test usage only.
void set_history_dir(const base::FilePath& dir_path) {
@@ -298,7 +291,6 @@ class InMemoryURLIndex : public HistoryServiceObserver,
base::CancelableTaskTracker private_data_tracker_;
base::CancelableTaskTracker cache_reader_tracker_;
- content::NotificationRegistrar registrar_;
// Set to true once the shutdown process has begun.
bool shutdown_;

Powered by Google App Engine
This is Rietveld 408576698