Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 11515005: Delay updating jumplist to avoid blocking the file thread at start-up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/load_complete_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 0324a59cdaba4cd95512bce4b57d048c39c90047..e121979fc319083f95f9da19127499bf09315bbd 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -2223,8 +2223,7 @@ void BrowserView::Init() {
// Create a custom JumpList and add it to an observer of TabRestoreService
// so we can update the custom JumpList when a tab is added or removed.
if (JumpList::Enabled()) {
- jumplist_ = new JumpList();
- jumplist_->AddObserver(browser_->profile());
+ load_complete_listener_.reset(new LoadCompleteListener(this));
}
#endif
@@ -2257,6 +2256,14 @@ void BrowserView::LoadingAnimationCallback() {
}
}
+void BrowserView::OnLoadCompleted() {
+ #if defined(OS_WIN) && !defined(USE_AURA)
sky 2012/12/20 01:46:28 Don't indent #ifs.
+ DCHECK(!jumplist_);
+ jumplist_ = new JumpList();
+ jumplist_->AddObserver(browser_->profile());
+ #endif
+}
+
// BrowserView, private --------------------------------------------------------
BrowserViewLayout* BrowserView::GetBrowserViewLayout() const {
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/load_complete_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698