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

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: Removed local variables in tests 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..8086095cfd47d1c89f9748d2c97e11677c811e20 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;
@@ -47,8 +45,6 @@ namespace imui = in_memory_url_index;
class HistoryClient;
class HistoryDatabase;
class URLIndexPrivateData;
-struct URLsDeletedDetails;
-struct URLsModifiedDetails;
// The URL history source.
// Holds portions of the URL database in memory in an indexed form. Used to
@@ -70,7 +66,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 +146,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 +231,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 +239,13 @@ class InMemoryURLIndex : public HistoryServiceObserver,
base::Time visit_time) override;
void OnURLsModified(HistoryService* history_service,
const URLRows& changed_urls) override;
+ void OnURLsDeleted(HistoryService* history_service,
+ bool all_history,
+ bool expired,
+ const URLRows& deleted_rows,
+ const std::set<GURL>& favicon_urls) 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