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

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

Issue 631253002: Refactor sending NOTIFICATION_HISTORY_URL_VISITED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests on Android Created 6 years, 2 months 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
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/history/in_memory_history_backend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/in_memory_history_backend.h
diff --git a/chrome/browser/history/in_memory_history_backend.h b/chrome/browser/history/in_memory_history_backend.h
index 1699834922a9a09e2b7f398569ab32125f3f6843..5cf3180d35c9539da788bd45ff13aa5e52cb60d4 100644
--- a/chrome/browser/history/in_memory_history_backend.h
+++ b/chrome/browser/history/in_memory_history_backend.h
@@ -25,10 +25,12 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "components/history/core/browser/history_service_observer.h"
#include "components/history/core/browser/keyword_id.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+class HistoryService;
class Profile;
namespace base {
@@ -45,7 +47,8 @@ class URLRow;
struct URLsDeletedDetails;
struct URLsModifiedDetails;
-class InMemoryHistoryBackend : public content::NotificationObserver {
+class InMemoryHistoryBackend : public HistoryServiceObserver,
+ public content::NotificationObserver {
public:
InMemoryHistoryBackend();
virtual ~InMemoryHistoryBackend();
@@ -57,7 +60,8 @@ class InMemoryHistoryBackend : public content::NotificationObserver {
// Does initialization work when this object is attached to the history
// system on the main thread. The argument is the profile with which the
// attached history service is under.
- void AttachToHistoryService(Profile* profile);
+ void AttachToHistoryService(Profile* profile,
+ HistoryService* history_service);
// Deletes all search terms for the specified keyword.
void DeleteAllSearchTermsForKeyword(KeywordID keyword_id);
@@ -69,6 +73,13 @@ class InMemoryHistoryBackend : public content::NotificationObserver {
return db_.get();
}
+ // HistoryServiceObserver:
+ virtual void OnURLVisited(HistoryService* history_service,
+ ui::PageTransition transition,
+ const URLRow& row,
+ const RedirectList& redirects,
+ base::Time visit_time) OVERRIDE;
+
// Notification callback.
virtual void Observe(int type,
const content::NotificationSource& source,
@@ -96,6 +107,7 @@ class InMemoryHistoryBackend : public content::NotificationObserver {
// The profile that this object is attached. May be NULL before
// initialization.
Profile* profile_;
+ HistoryService* history_service_;
DISALLOW_COPY_AND_ASSIGN(InMemoryHistoryBackend);
};
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/history/in_memory_history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698