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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 10640019: Remove the HANDLED_EXTERNALLY status code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase + fix nits Created 8 years, 3 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
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/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/browser/api/prefs/pref_member.h" 10 #include "chrome/browser/api/prefs/pref_member.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 performance_monitor::PerformanceMonitor::GetInstance()->BytesReadOnIOThread( 254 performance_monitor::PerformanceMonitor::GetInstance()->BytesReadOnIOThread(
255 request, bytes_read); 255 request, bytes_read);
256 256
257 #if defined(ENABLE_TASK_MANAGER) 257 #if defined(ENABLE_TASK_MANAGER)
258 TaskManager::GetInstance()->model()->NotifyBytesRead(request, bytes_read); 258 TaskManager::GetInstance()->model()->NotifyBytesRead(request, bytes_read);
259 #endif // defined(ENABLE_TASK_MANAGER) 259 #endif // defined(ENABLE_TASK_MANAGER)
260 } 260 }
261 261
262 void ChromeNetworkDelegate::OnCompleted(net::URLRequest* request, 262 void ChromeNetworkDelegate::OnCompleted(net::URLRequest* request,
263 bool started) { 263 bool started) {
264 if (request->status().status() == net::URLRequestStatus::SUCCESS || 264 if (request->status().status() == net::URLRequestStatus::SUCCESS) {
265 request->status().status() == net::URLRequestStatus::HANDLED_EXTERNALLY) {
266 bool is_redirect = request->response_headers() && 265 bool is_redirect = request->response_headers() &&
267 net::HttpResponseHeaders::IsRedirectResponseCode( 266 net::HttpResponseHeaders::IsRedirectResponseCode(
268 request->response_headers()->response_code()); 267 request->response_headers()->response_code());
269 if (!is_redirect) { 268 if (!is_redirect) {
270 ExtensionWebRequestEventRouter::GetInstance()->OnCompleted( 269 ExtensionWebRequestEventRouter::GetInstance()->OnCompleted(
271 profile_, extension_info_map_.get(), request); 270 profile_, extension_info_map_.get(), request);
272 } 271 }
273 } else if (request->status().status() == net::URLRequestStatus::FAILED || 272 } else if (request->status().status() == net::URLRequestStatus::FAILED ||
274 request->status().status() == net::URLRequestStatus::CANCELED) { 273 request->status().status() == net::URLRequestStatus::CANCELED) {
275 ExtensionWebRequestEventRouter::GetInstance()->OnErrorOccurred( 274 ExtensionWebRequestEventRouter::GetInstance()->OnErrorOccurred(
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 #endif 431 #endif
433 return net::OK; 432 return net::OK;
434 } 433 }
435 434
436 void ChromeNetworkDelegate::OnRequestWaitStateChange( 435 void ChromeNetworkDelegate::OnRequestWaitStateChange(
437 const net::URLRequest& request, 436 const net::URLRequest& request,
438 RequestWaitState state) { 437 RequestWaitState state) {
439 if (load_time_stats_) 438 if (load_time_stats_)
440 load_time_stats_->OnRequestWaitStateChange(request, state); 439 load_time_stats_->OnRequestWaitStateChange(request, state);
441 } 440 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698