summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 09:32:57 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 09:32:57 +0000
commit19cd84b3cf2b0bc58837dbbe69bb0aea3d3ce841 (patch)
treeb97f2931485337498ac94602e2a6e19c24d3ba39 /chrome/browser
parentde21492cdd9d039bfb91742f2b33301df516e179 (diff)
downloadchromium_src-19cd84b3cf2b0bc58837dbbe69bb0aea3d3ce841.zip
chromium_src-19cd84b3cf2b0bc58837dbbe69bb0aea3d3ce841.tar.gz
chromium_src-19cd84b3cf2b0bc58837dbbe69bb0aea3d3ce841.tar.bz2
Fix a regression that the sad tab favicon is not displayed when a tab crashes.
This regressed in my favicon/title updating change because the crashed state is not updated on the codepath, since it comes from the tab. The other approach would have been to make this call through the "update everything" codepath for tbe state changing, but that's executed on a timer, and it's nice to show the tab crash right away since the check is very inexpensive. BUG=http://crbug.com/10756 Review URL: http://codereview.chromium.org/99341 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/tabs/tab_strip_model.h4
-rw-r--r--chrome/browser/views/tabs/tab_renderer.cc6
2 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h
index 6f35d47..66c6b395 100644
--- a/chrome/browser/tabs/tab_strip_model.h
+++ b/chrome/browser/tabs/tab_strip_model.h
@@ -77,7 +77,9 @@ class TabStripModelObserver {
// by the time this message is delivered.
//
// If only the loading state was updated, the loading_only flag should be
- // specified. The tab model will update only the throbber and loading status.
+ // specified. The tab model will update only the throbber, loading status,
+ // and crashed state.
+ //
// If other things change, set this flag to false to update all state,
// including the title and favicon. This allows us to start/stop throbbing
// without updating the title (which may be an ugly URL if the real title
diff --git a/chrome/browser/views/tabs/tab_renderer.cc b/chrome/browser/views/tabs/tab_renderer.cc
index 107af980..7f62be5 100644
--- a/chrome/browser/views/tabs/tab_renderer.cc
+++ b/chrome/browser/views/tabs/tab_renderer.cc
@@ -242,7 +242,6 @@ void TabRenderer::UpdateData(TabContents* contents, bool loading_only) {
data_.title = UTF16ToWideHack(contents->GetTitle());
data_.off_the_record = contents->profile()->IsOffTheRecord();
data_.show_download_icon = contents->IsDownloadShelfVisible();
- data_.crashed = contents->is_crashed();
data_.favicon = contents->GetFavIcon();
}
@@ -250,6 +249,11 @@ void TabRenderer::UpdateData(TabContents* contents, bool loading_only) {
// we display the throbber.
data_.loading = contents->is_loading();
data_.show_icon = contents->ShouldDisplayFavIcon();
+
+ // Because the crashed notification comes through the tab contents, it
+ // appears as a loading_only change. This is fine, since the crashed flag is
+ // trivial to update unlike the title and favicon.
+ data_.crashed = contents->is_crashed();
}
void TabRenderer::UpdateFromModel() {