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

Unified Diff: chrome/browser/visitedlink_master.h

Issue 502005: Preload the visited link db on the file thread. (Closed)
Patch Set: comments Created 11 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
« no previous file with comments | « chrome/browser/profile.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
diff --git a/chrome/browser/visitedlink_master.h b/chrome/browser/visitedlink_master.h
index fc35ff98b1afcfcfd3b51fcf08cfce5636e3f49c..74be3765a7f7eeee22f3dc083d9bf421798e67cd 100644
--- a/chrome/browser/visitedlink_master.h
+++ b/chrome/browser/visitedlink_master.h
@@ -77,9 +77,19 @@ class VisitedLinkMaster : public VisitedLinkCommon {
// Must be called immediately after object creation. Nothing else will work
// until this is called. Returns true on success, false means that this
- // object won't work.
+ // object won't work. You can also use InitFromFile() and InitFromScratch()
+ // if you need more control over loading the visited link information.
bool Init();
+ // Try to load the table from the database file. If the file doesn't exist or
+ // is corrupt, this will return failure.
+ bool InitFromFile();
+
+ // Creates a new empty table, call if InitFromFile() fails. Normally, when
+ // |suppress_rebuild| is false, the table will be rebuilt from history,
+ // keeping us in sync.
+ bool InitFromScratch();
+
base::SharedMemory* shared_memory() { return shared_memory_; }
// Adds a URL to the table.
@@ -167,10 +177,6 @@ class VisitedLinkMaster : public VisitedLinkCommon {
// the table file open and the handle to it in file_
bool WriteFullTable();
- // Try to load the table from the database file. If the file doesn't exist or
- // is corrupt, this will return failure.
- bool InitFromFile();
-
// Reads the header of the link coloring database from disk. Assumes the
// file pointer is at the beginning of the file and that there are no pending
// asynchronous I/O operations.
@@ -222,13 +228,6 @@ class VisitedLinkMaster : public VisitedLinkCommon {
// fingerprint was deleted, false if it was not in the table to delete.
bool DeleteFingerprint(Fingerprint fingerprint, bool update_file);
- // Creates a new empty table, call if InitFromFile() fails. Normally, when
- // |suppress_rebuild| is false, the table will be rebuilt from history,
- // keeping us in sync. When |suppress_rebuild| is true, the new table will be
- // empty and we will not consult history. This is used when clearing the
- // database and for unit tests.
- bool InitFromScratch(bool suppress_rebuild);
-
// Allocates the Fingerprint structure and length. When init_to_empty is set,
// the table will be filled with 0s and used_items_ will be set to 0 as well.
// If the flag is not set, these things are untouched and it is the
« no previous file with comments | « chrome/browser/profile.cc ('k') | chrome/browser/visitedlink_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698