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

Unified Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 4055004: Change window opening behavior for HtmlDialogTabContentsDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased from trunk and fixed comments in HtmlDialogTabContentsDelegate Created 10 years, 1 month 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/dom_ui/html_dialog_tab_contents_delegate_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/bookmark_bar_view.cc
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index db381630b3802a41307d712cb7030722ed2d6f1f..9188aa52ab658773e37f957faf333d6c64e0825b 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -447,11 +447,13 @@ void BookmarkBarView::SetProfile(Profile* profile) {
delete GetChildViewAt(0);
model_ = profile_->GetBookmarkModel();
- model_->AddObserver(this);
- if (model_->IsLoaded())
- Loaded(model_);
- // else case: we'll receive notification back from the BookmarkModel when done
- // loading, then we'll populate the bar.
+ if (model_) {
+ model_->AddObserver(this);
+ if (model_->IsLoaded())
+ Loaded(model_);
+ // else case: we'll receive notification back from the BookmarkModel when
+ // done loading, then we'll populate the bar.
+ }
}
void BookmarkBarView::SetPageNavigator(PageNavigator* navigator) {
« no previous file with comments | « chrome/browser/dom_ui/html_dialog_tab_contents_delegate_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698