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

Unified Diff: chrome/browser/visitedlink_master.h

Issue 113591: Fix Acid3 Test 48: LINKTEST, Chromium side.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Made waiting more bearable. Created 11 years, 6 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/visitedlink_event_listener.cc ('k') | chrome/browser/visitedlink_master.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/visitedlink_master.h
===================================================================
--- chrome/browser/visitedlink_master.h (revision 19822)
+++ chrome/browser/visitedlink_master.h (working copy)
@@ -35,12 +35,30 @@
// operations are pending on another thread.
class VisitedLinkMaster : public VisitedLinkCommon {
public:
- typedef void (PostNewTableEvent)(base::SharedMemory*);
+ // Listens to the link coloring database events. The master is given this
+ // event as a constructor argument and dispatches events using it.
+ class Listener {
+ public:
+ virtual ~Listener() {}
+ // Called when link coloring database has been created or replaced. The
+ // argument is the new table handle.
+ virtual void NewTable(base::SharedMemory*) = 0;
+
+ // Called when new link has been added. The argument is the fingerprint
+ // (hash) of the link.
+ virtual void Add(Fingerprint fingerprint) = 0;
+
+ // Called when link coloring state has been reset. This may occur when
+ // entire or parts of history were deleted.
+ virtual void Reset() = 0;
+ };
+
// The |file_thread| may be NULL, in which case write operations will be
// synchronous.
+ // The |listener| may not be NULL.
VisitedLinkMaster(base::Thread* file_thread,
- PostNewTableEvent* poster,
+ Listener* listener,
Profile* profile);
// In unit test mode, we allow the caller to optionally specify the database
@@ -59,7 +77,7 @@
// history if the file can't be loaded. This should generally be set for
// testing except when you want to test the rebuild process explicitly.
VisitedLinkMaster(base::Thread* file_thread,
- PostNewTableEvent* poster,
+ Listener* listener,
HistoryService* history_service,
bool suppress_rebuild,
const FilePath& filename,
@@ -150,7 +168,7 @@
// Backend for the constructors initializing the members.
void InitMembers(base::Thread* file_thread,
- PostNewTableEvent* poster,
+ Listener* listener,
Profile* profile);
// If a rebuild is in progress, we save the URL in the temporary list.
@@ -294,7 +312,7 @@
return hash - 1;
}
- PostNewTableEvent* post_new_table_event_;
+ Listener* listener_;
#ifndef NDEBUG
// Indicates whether any asynchronous operation has ever been completed.
« no previous file with comments | « chrome/browser/visitedlink_event_listener.cc ('k') | chrome/browser/visitedlink_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698