diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-12 08:01:44 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-12 08:01:44 +0000 |
commit | a6d0f18778b7f27a3a5cb2feac1039e4a8f4235c (patch) | |
tree | 79bbaf938bf3e7d98f9c8dcbebcd891f3237e4d2 /chrome/browser/visitedlink_master.h | |
parent | 3bcea86de6bbab9ae23146b2aed08028ae800ecb (diff) | |
download | chromium_src-a6d0f18778b7f27a3a5cb2feac1039e4a8f4235c.zip chromium_src-a6d0f18778b7f27a3a5cb2feac1039e4a8f4235c.tar.gz chromium_src-a6d0f18778b7f27a3a5cb2feac1039e4a8f4235c.tar.bz2 |
Revert "Take 2: Preload the visited link db on the file thread if"
This reverts commit r35991 due to a perf regression to New Tab Cold
on Mac.
TBR=thakis
Review URL: http://codereview.chromium.org/545024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35997 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/visitedlink_master.h')
-rw-r--r-- | chrome/browser/visitedlink_master.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/chrome/browser/visitedlink_master.h b/chrome/browser/visitedlink_master.h index 14ba9d8..fc35ff9 100644 --- a/chrome/browser/visitedlink_master.h +++ b/chrome/browser/visitedlink_master.h @@ -77,18 +77,9 @@ 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. You can also use InitFromFile() and InitFromScratch() - // if you need more control over loading the visited link information. + // object won't work. bool Init(); - // Try to load the table from the database file. If the file doesn't exist or - // is corrupt, this will return failure. This method may be called from a - // background thread, but it isn't thread safe. - bool InitFromFile(); - - // Creates a new empty table, call if InitFromFile() fails. - bool InitFromScratch(); - base::SharedMemory* shared_memory() { return shared_memory_; } // Adds a URL to the table. @@ -176,6 +167,10 @@ 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. @@ -227,6 +222,13 @@ 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 @@ -367,9 +369,6 @@ class VisitedLinkMaster : public VisitedLinkCommon { // will be false in production. bool suppress_rebuild_; - // Keep a copy of the profile_dir in case we outlive the profile. - FilePath profile_dir_; - DISALLOW_EVIL_CONSTRUCTORS(VisitedLinkMaster); }; |