| Index: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
| diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
| index 21c34bebee5fc5843b5a1554f7cea70cd6f25836..d856678a2488e49f9dc3710c683cce79caa9cd7b 100644
|
| --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
| +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
| @@ -34,6 +34,9 @@
|
| #include "components/omnibox/browser/autocomplete_match.h"
|
| #include "components/prefs/pref_service.h"
|
| #include "content/public/browser/browser_thread.h"
|
| +#include "content/public/browser/navigation_controller.h"
|
| +#include "content/public/browser/navigation_entry.h"
|
| +#include "content/public/browser/navigation_handle.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/plugin_service.h"
|
| #include "content/public/browser/user_metrics.h"
|
| @@ -54,8 +57,18 @@ namespace {
|
|
|
| TabRendererData::NetworkState TabContentsNetworkState(
|
| WebContents* contents) {
|
| - if (!contents || !contents->IsLoadingToDifferentDocument())
|
| + if (!contents)
|
| return TabRendererData::NETWORK_STATE_NONE;
|
| +
|
| + if (!contents->IsLoadingToDifferentDocument()) {
|
| + content::NavigationEntry* entry =
|
| + contents->GetController().GetLastCommittedEntry();
|
| + VLOG(1) << "Tabcontents Network state:" << entry->GetPageType();
|
| + if (entry && (entry->GetPageType() == content::PAGE_TYPE_ERROR))
|
| + return TabRendererData::NETWORK_STATE_ERROR;
|
| + return TabRendererData::NETWORK_STATE_NONE;
|
| + }
|
| +
|
| if (contents->IsWaitingForResponse())
|
| return TabRendererData::NETWORK_STATE_WAITING;
|
| return TabRendererData::NETWORK_STATE_LOADING;
|
|
|