From afecfb73fdbca719e3a861b3255e68f2c3ef8780 Mon Sep 17 00:00:00 2001 From: "msarda@chromium.org" Date: Thu, 18 Apr 2013 17:17:33 +0000 Subject: Delay bookmarks load while the profile is loading. This CL adds a new DeferredSequencedtaskRunner that queues up tasks until a first call to Start is issued. It creates such a task runner for the execution of bookmarks I/O operations. At profile creation, the bookmarks task runner is stopped and its execution is started after the profile has finished loading. BUG=NONE Review URL: https://chromiumcodereview.appspot.com/12952005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194956 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/profiles/profile_manager.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'chrome/browser/profiles/profile_manager.h') diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h index a93d457..6cee37b8 100644 --- a/chrome/browser/profiles/profile_manager.h +++ b/chrome/browser/profiles/profile_manager.h @@ -211,10 +211,14 @@ class ProfileManager : public base::NonThreadSafe, // Autoloads profiles if they are running background apps. void AutoloadProfiles(); - // Register and add testing profile to the ProfileManager. Use ONLY in tests. + // Registers and adds testing profile to the ProfileManager. // This allows the creation of Profiles outside of the standard creation path - // for testing. If |addToCache|, add to ProfileInfoCache as well. - void RegisterTestingProfile(Profile* profile, bool addToCache); + // for testing. If |addToCache|, adds to ProfileInfoCache as well. + // If |start_deferred_task_runners|, starts the deferred task runners. + // Use ONLY in tests. + void RegisterTestingProfile(Profile* profile, + bool addToCache, + bool start_deferred_task_runners); const base::FilePath& user_data_dir() const { return user_data_dir_; } -- cgit v1.1