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

Side by Side Diff: chrome/browser/ui/tab_contents/core_tab_helper.cc

Issue 19278016: Add load states for stalled requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix comment Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | net/base/load_states_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" 5 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "chrome/browser/renderer_host/web_cache_manager.h" 9 #include "chrome/browser/renderer_host/web_cache_manager.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 20 matching lines...) Expand all
31 return l10n_util::GetStringUTF16(IDS_DEFAULT_TAB_TITLE); 31 return l10n_util::GetStringUTF16(IDS_DEFAULT_TAB_TITLE);
32 } 32 }
33 33
34 string16 CoreTabHelper::GetStatusText() const { 34 string16 CoreTabHelper::GetStatusText() const {
35 if (!web_contents()->IsLoading() || 35 if (!web_contents()->IsLoading() ||
36 web_contents()->GetLoadState().state == net::LOAD_STATE_IDLE) { 36 web_contents()->GetLoadState().state == net::LOAD_STATE_IDLE) {
37 return string16(); 37 return string16();
38 } 38 }
39 39
40 switch (web_contents()->GetLoadState().state) { 40 switch (web_contents()->GetLoadState().state) {
41 case net::LOAD_STATE_WAITING_FOR_STALLED_SOCKET_POOL:
42 case net::LOAD_STATE_WAITING_FOR_AVAILABLE_SOCKET:
43 return l10n_util::GetStringUTF16(IDS_LOAD_STATE_WAITING_FOR_SOCKET_SLOT);
41 case net::LOAD_STATE_WAITING_FOR_DELEGATE: 44 case net::LOAD_STATE_WAITING_FOR_DELEGATE:
42 if (!web_contents()->GetLoadState().param.empty()) { 45 if (!web_contents()->GetLoadState().param.empty()) {
43 return l10n_util::GetStringFUTF16(IDS_LOAD_STATE_WAITING_FOR_DELEGATE, 46 return l10n_util::GetStringFUTF16(IDS_LOAD_STATE_WAITING_FOR_DELEGATE,
44 web_contents()->GetLoadState().param); 47 web_contents()->GetLoadState().param);
45 } else { 48 } else {
46 return l10n_util::GetStringUTF16( 49 return l10n_util::GetStringUTF16(
47 IDS_LOAD_STATE_WAITING_FOR_DELEGATE_GENERIC); 50 IDS_LOAD_STATE_WAITING_FOR_DELEGATE_GENERIC);
48 } 51 }
49 case net::LOAD_STATE_WAITING_FOR_CACHE: 52 case net::LOAD_STATE_WAITING_FOR_CACHE:
50 return l10n_util::GetStringUTF16(IDS_LOAD_STATE_WAITING_FOR_CACHE); 53 return l10n_util::GetStringUTF16(IDS_LOAD_STATE_WAITING_FOR_CACHE);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 149
147 } 150 }
148 151
149 void CoreTabHelper::BeforeUnloadFired(const base::TimeTicks& proceed_time) { 152 void CoreTabHelper::BeforeUnloadFired(const base::TimeTicks& proceed_time) {
150 before_unload_end_time_ = proceed_time; 153 before_unload_end_time_ = proceed_time;
151 } 154 }
152 155
153 void CoreTabHelper::BeforeUnloadDialogCancelled() { 156 void CoreTabHelper::BeforeUnloadDialogCancelled() {
154 OnCloseCanceled(); 157 OnCloseCanceled();
155 } 158 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | net/base/load_states_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698