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

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: incorporated feedback 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 "chrome/browser/api/prefs/pref_member.h" 8 #include "chrome/browser/api/prefs/pref_member.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/content_settings/cookie_settings.h" 10 #include "chrome/browser/content_settings/cookie_settings.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 performance_monitor::PerformanceMonitor::GetInstance()->BytesReadOnIOThread( 252 performance_monitor::PerformanceMonitor::GetInstance()->BytesReadOnIOThread(
253 request, bytes_read); 253 request, bytes_read);
254 254
255 #if defined(ENABLE_TASK_MANAGER) 255 #if defined(ENABLE_TASK_MANAGER)
256 TaskManager::GetInstance()->model()->NotifyBytesRead(request, bytes_read); 256 TaskManager::GetInstance()->model()->NotifyBytesRead(request, bytes_read);
257 #endif // defined(ENABLE_TASK_MANAGER) 257 #endif // defined(ENABLE_TASK_MANAGER)
258 } 258 }
259 259
260 void ChromeNetworkDelegate::OnCompleted(net::URLRequest* request, 260 void ChromeNetworkDelegate::OnCompleted(net::URLRequest* request,
261 bool started) { 261 bool started) {
262 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
262 if (request->status().status() == net::URLRequestStatus::SUCCESS || 263 if (request->status().status() == net::URLRequestStatus::SUCCESS ||
263 request->status().status() == net::URLRequestStatus::HANDLED_EXTERNALLY) { 264 (info && info->Ignored())) {
darin (slow to review) 2012/08/29 22:01:37 nit: perhaps it would be worth it to also check fo
mkosiba (inactive) 2012/08/30 15:29:43 We already check for status().status() == CANCELED
264 bool is_redirect = request->response_headers() && 265 bool is_redirect = request->response_headers() &&
265 net::HttpResponseHeaders::IsRedirectResponseCode( 266 net::HttpResponseHeaders::IsRedirectResponseCode(
266 request->response_headers()->response_code()); 267 request->response_headers()->response_code());
267 if (!is_redirect) { 268 if (!is_redirect) {
268 ExtensionWebRequestEventRouter::GetInstance()->OnCompleted( 269 ExtensionWebRequestEventRouter::GetInstance()->OnCompleted(
269 profile_, extension_info_map_.get(), request); 270 profile_, extension_info_map_.get(), request);
270 } 271 }
271 } else if (request->status().status() == net::URLRequestStatus::FAILED || 272 } else if (request->status().status() == net::URLRequestStatus::FAILED ||
272 request->status().status() == net::URLRequestStatus::CANCELED) { 273 request->status().status() == net::URLRequestStatus::CANCELED) {
273 ExtensionWebRequestEventRouter::GetInstance()->OnErrorOccurred( 274 ExtensionWebRequestEventRouter::GetInstance()->OnErrorOccurred(
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 #endif 416 #endif
416 return net::OK; 417 return net::OK;
417 } 418 }
418 419
419 void ChromeNetworkDelegate::OnRequestWaitStateChange( 420 void ChromeNetworkDelegate::OnRequestWaitStateChange(
420 const net::URLRequest& request, 421 const net::URLRequest& request,
421 RequestWaitState state) { 422 RequestWaitState state) {
422 if (load_time_stats_) 423 if (load_time_stats_)
423 load_time_stats_->OnRequestWaitStateChange(request, state); 424 load_time_stats_->OnRequestWaitStateChange(request, state);
424 } 425 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698