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

Unified Diff: chrome/browser/ui/browser.cc

Issue 6577003: Entire DOMBrowser stack (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 10 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index b80ef61bdb366294efe5757bcd2844d918f83776..254c356e6576d079e0da0bd89a85e05b63688c6c 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1291,6 +1291,9 @@ void Browser::Home(WindowOpenDisposition disposition) {
void Browser::OpenCurrentURL() {
UserMetrics::RecordAction(UserMetricsAction("LoadURL"), profile_);
LocationBar* location_bar = window_->GetLocationBar();
+ if(!location_bar)
+ return;
+
WindowOpenDisposition open_disposition =
location_bar->GetWindowOpenDisposition();
if (OpenInstant(open_disposition))
@@ -3876,9 +3879,11 @@ void Browser::ProcessPendingUIUpdates() {
if (contents == GetSelectedTabContents()) {
// Updates that only matter when the tab is selected go here.
- if (flags & TabContents::INVALIDATE_PAGE_ACTIONS)
- window()->GetLocationBar()->UpdatePageActions();
-
+ if (flags & TabContents::INVALIDATE_PAGE_ACTIONS) {
+ LocationBar* location_bar = window()->GetLocationBar();
+ if(location_bar)
+ location_bar->UpdatePageActions();
+ }
// Updating the URL happens synchronously in ScheduleUIUpdate.
if (flags & TabContents::INVALIDATE_LOAD && GetStatusBubble()) {
GetStatusBubble()->SetStatus(
@@ -4205,8 +4210,11 @@ void Browser::TabDetachedAtImpl(TabContentsWrapper* contents, int index,
// is the selected tab. Because saving state can conditionally revert the
// location bar, saving the current tab's location bar state to a
// non-selected tab can corrupt both tabs.
- if (contents == GetSelectedTabContentsWrapper())
- window_->GetLocationBar()->SaveStateToContents(contents->tab_contents());
+ if (contents == GetSelectedTabContentsWrapper()) {
+ LocationBar* location_bar = window()->GetLocationBar();
+ if(location_bar)
+ location_bar->SaveStateToContents(contents->tab_contents());
+ }
if (!tab_handler_->GetTabStripModel()->closing_all())
SyncHistoryWithTabs(0);
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698