diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-12 03:39:53 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-12 03:39:53 +0000 |
commit | a5fb1c5db00481df8e2707b1b1ef8ecd4d62559f (patch) | |
tree | 655b48f2ae981cc33dfe9714b36a9e4ab9cdd79c /chrome/browser/profile.h | |
parent | d43a385b95751e8e85d68f41a979d575372b08e1 (diff) | |
download | chromium_src-a5fb1c5db00481df8e2707b1b1ef8ecd4d62559f.zip chromium_src-a5fb1c5db00481df8e2707b1b1ef8ecd4d62559f.tar.gz chromium_src-a5fb1c5db00481df8e2707b1b1ef8ecd4d62559f.tar.bz2 |
Take 2: Preload the visited link db on the file thread if
the file exists. Otherwise, just load like normal on the UI thread.
This failed before because the browser may have shutdown before the
posted task ran. When the posted task finally runs, it tried to
use the profile, but the profile was already deleted. Make a small
change to VisitedLinkMaster so GetDatabaseFileName no longer depends
on the profile.
BUG=24163
Review URL: http://codereview.chromium.org/507047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.h')
-rw-r--r-- | chrome/browser/profile.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h index 1d15753..95f76b0 100644 --- a/chrome/browser/profile.h +++ b/chrome/browser/profile.h @@ -64,8 +64,8 @@ class ThemeProvider; class ThumbnailStore; class URLRequestContextGetter; class UserScriptMaster; +class VisitedLinkCreator; class VisitedLinkMaster; -class VisitedLinkEventListener; class WebDataService; class WebKitContext; class WebResourceService; @@ -148,6 +148,10 @@ class Profile { // that this method is called. virtual VisitedLinkMaster* GetVisitedLinkMaster() = 0; + // Loads the visited link master on the file thread. It's safe to call + // GetVisitedLinkMaster without calling this in advance. + virtual void PreloadVisitedLinkMaster() = 0; + // Retrieves a pointer to the ExtensionsService associated with this // profile. The ExtensionsService is created at startup. virtual ExtensionsService* GetExtensionsService() = 0; @@ -406,6 +410,7 @@ class ProfileImpl : public Profile, virtual Profile* GetOriginalProfile(); virtual webkit_database::DatabaseTracker* GetDatabaseTracker(); virtual VisitedLinkMaster* GetVisitedLinkMaster(); + virtual void PreloadVisitedLinkMaster(); virtual UserScriptMaster* GetUserScriptMaster(); virtual SSLHostState* GetSSLHostState(); virtual net::TransportSecurityState* GetTransportSecurityState(); @@ -491,8 +496,7 @@ class ProfileImpl : public Profile, FilePath path_; FilePath base_cache_path_; - scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_; - scoped_ptr<VisitedLinkMaster> visited_link_master_; + scoped_refptr<VisitedLinkCreator> visited_link_creator_; scoped_refptr<ExtensionsService> extensions_service_; scoped_refptr<UserScriptMaster> user_script_master_; scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_; |