diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-17 23:07:25 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-17 23:07:25 +0000 |
commit | 4510541f84c5a019a9833a3ee1341246a954c994 (patch) | |
tree | 60cd8a950432c33b8441fe15f129545546a997cc /chrome/browser/visitedlink_master.h | |
parent | 705876878daf7081136ab82f20035d2d71dcc8f9 (diff) | |
download | chromium_src-4510541f84c5a019a9833a3ee1341246a954c994.zip chromium_src-4510541f84c5a019a9833a3ee1341246a954c994.tar.gz chromium_src-4510541f84c5a019a9833a3ee1341246a954c994.tar.bz2 |
Revert "Preload the visited link db on the file thread if the file exists."
There are ui_test crashes with this change.
This reverts commit r34874.
TBR=mirandac
Review URL: http://codereview.chromium.org/502063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34892 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/visitedlink_master.h')
-rw-r--r-- | chrome/browser/visitedlink_master.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/chrome/browser/visitedlink_master.h b/chrome/browser/visitedlink_master.h index 74be376..fc35ff9 100644 --- a/chrome/browser/visitedlink_master.h +++ b/chrome/browser/visitedlink_master.h @@ -77,19 +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. - 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. @@ -177,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. @@ -228,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 |