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

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: rebase Created 7 years, 12 months 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
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 d790098fc06d42ab6f0c6df787712da080486e91..f2238f57b4a082c07e6951174b108552da39dfd4 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -2236,8 +2236,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
@@ -2270,6 +2269,14 @@ void BrowserView::LoadingAnimationCallback() {
}
}
+void BrowserView::OnLoadCompleted() {
+#if defined(OS_WIN) && !defined(USE_AURA)
+ DCHECK(!jumplist_);
+ jumplist_ = new JumpList();
+ jumplist_->AddObserver(browser_->profile());
+#endif
+}
+
// BrowserView, private --------------------------------------------------------
BrowserViewLayout* BrowserView::GetBrowserViewLayout() const {

Powered by Google App Engine
This is Rietveld 408576698