| OLD | NEW |
| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 } else { | 215 } else { |
| 216 *status_text = | 216 *status_text = |
| 217 l10n_util::GetStringUTF16(IDS_LOAD_STATE_SENDING_REQUEST); | 217 l10n_util::GetStringUTF16(IDS_LOAD_STATE_SENDING_REQUEST); |
| 218 return true; | 218 return true; |
| 219 } | 219 } |
| 220 case net::LOAD_STATE_WAITING_FOR_RESPONSE: | 220 case net::LOAD_STATE_WAITING_FOR_RESPONSE: |
| 221 *status_text = | 221 *status_text = |
| 222 l10n_util::GetStringFUTF16(IDS_LOAD_STATE_WAITING_FOR_RESPONSE, | 222 l10n_util::GetStringFUTF16(IDS_LOAD_STATE_WAITING_FOR_RESPONSE, |
| 223 source->GetLoadStateHost()); | 223 source->GetLoadStateHost()); |
| 224 return true; | 224 return true; |
| 225 case net::LOAD_STATE_THROTTLED: |
| 226 *status_text = l10n_util::GetStringUTF16(IDS_LOAD_STATE_THROTTLED); |
| 227 return true; |
| 225 // Ignore net::LOAD_STATE_READING_RESPONSE and net::LOAD_STATE_IDLE | 228 // Ignore net::LOAD_STATE_READING_RESPONSE and net::LOAD_STATE_IDLE |
| 226 case net::LOAD_STATE_IDLE: | 229 case net::LOAD_STATE_IDLE: |
| 227 case net::LOAD_STATE_READING_RESPONSE: | 230 case net::LOAD_STATE_READING_RESPONSE: |
| 228 break; | 231 break; |
| 229 } | 232 } |
| 230 if (!guest_manager) | 233 if (!guest_manager) |
| 231 return false; | 234 return false; |
| 232 | 235 |
| 233 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/467185 is | 236 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/467185 is |
| 234 // fixed. | 237 // fixed. |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 DCHECK(!content_type.empty()); | 358 DCHECK(!content_type.empty()); |
| 356 open_url_params.uses_post = true; | 359 open_url_params.uses_post = true; |
| 357 open_url_params.browser_initiated_post_data = | 360 open_url_params.browser_initiated_post_data = |
| 358 base::RefCountedString::TakeString(post_data); | 361 base::RefCountedString::TakeString(post_data); |
| 359 open_url_params.extra_headers += base::StringPrintf( | 362 open_url_params.extra_headers += base::StringPrintf( |
| 360 "%s: %s\r\n", net::HttpRequestHeaders::kContentType, | 363 "%s: %s\r\n", net::HttpRequestHeaders::kContentType, |
| 361 content_type.c_str()); | 364 content_type.c_str()); |
| 362 } | 365 } |
| 363 web_contents()->OpenURL(open_url_params); | 366 web_contents()->OpenURL(open_url_params); |
| 364 } | 367 } |
| OLD | NEW |