diff options
author | altimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-19 11:37:21 +0000 |
---|---|---|
committer | altimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-19 11:37:21 +0000 |
commit | 844a10004ee756dd8c4fa9c0c5e6ccadabd83b74 (patch) | |
tree | c25f0168789bca79d68982a3a0b9cd0d39286c81 /chrome/browser/task_manager/task_manager.cc | |
parent | 9b464b9ca9cebbad516d537a742c2ea9c351a860 (diff) | |
download | chromium_src-844a10004ee756dd8c4fa9c0c5e6ccadabd83b74.zip chromium_src-844a10004ee756dd8c4fa9c0c5e6ccadabd83b74.tar.gz chromium_src-844a10004ee756dd8c4fa9c0c5e6ccadabd83b74.tar.bz2 |
This CL implements alternative asynchronous methods for profile and preferences loading.
BUG=chromium-os:11104
TEST=UserProfileGotten (see "/tmp/login-times-sent") time doesn't increase, while UI jankness decreases.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81394 (patch set <= 25), but reverted.
Review URL: http://codereview.chromium.org/6716025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager/task_manager.cc')
-rw-r--r-- | chrome/browser/task_manager/task_manager.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/task_manager/task_manager.cc b/chrome/browser/task_manager/task_manager.cc index baca837..6bc6543 100644 --- a/chrome/browser/task_manager/task_manager.cc +++ b/chrome/browser/task_manager/task_manager.cc @@ -960,12 +960,13 @@ void TaskManager::OpenAboutMemory() { if (!browser) { // On OS X, the task manager can be open without any open browser windows. - if (!g_browser_process || - !g_browser_process->profile_manager() || - g_browser_process->profile_manager()->begin() == - g_browser_process->profile_manager()->end()) + if (!g_browser_process || !g_browser_process->profile_manager()) return; - browser = Browser::Create(*g_browser_process->profile_manager()->begin()); + Profile* profile = + g_browser_process->profile_manager()->GetDefaultProfile(); + if (!profile) + return; + browser = Browser::Create(profile); browser->OpenURL(GURL(chrome::kAboutMemoryURL), GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); browser->window()->Show(); |