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

Side by Side Diff: chrome/common/resource_dispatcher.cc

Issue 7276: Adding security info to canceled requests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "chrome/common/resource_dispatcher.h" 7 #include "chrome/common/resource_dispatcher.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 } 375 }
376 376
377 PendingRequestInfo& request_info = it->second; 377 PendingRequestInfo& request_info = it->second;
378 378
379 RESOURCE_LOG("Dispatching redirect for " << 379 RESOURCE_LOG("Dispatching redirect for " <<
380 request_info.peer->GetURLForDebugging()); 380 request_info.peer->GetURLForDebugging());
381 request_info.peer->OnReceivedRedirect(new_url); 381 request_info.peer->OnReceivedRedirect(new_url);
382 } 382 }
383 383
384 void ResourceDispatcher::OnRequestComplete(int request_id, 384 void ResourceDispatcher::OnRequestComplete(int request_id,
385 const URLRequestStatus& status) { 385 const URLRequestStatus& status,
386 const std::string& security_info) {
386 PendingRequestList::iterator it = pending_requests_.find(request_id); 387 PendingRequestList::iterator it = pending_requests_.find(request_id);
387 if (it == pending_requests_.end()) { 388 if (it == pending_requests_.end()) {
388 // this might happen for kill()ed requests on the webkit end, so perhaps 389 // this might happen for kill()ed requests on the webkit end, so perhaps
389 // it shouldn't be a warning... 390 // it shouldn't be a warning...
390 DLOG(WARNING) << "Got 'complete' for a nonexistant or finished request"; 391 DLOG(WARNING) << "Got 'complete' for a nonexistant or finished request";
391 return; 392 return;
392 } 393 }
393 394
394 PendingRequestInfo& request_info = it->second; 395 PendingRequestInfo& request_info = it->second;
395 webkit_glue::ResourceLoaderBridge::Peer* peer = request_info.peer; 396 webkit_glue::ResourceLoaderBridge::Peer* peer = request_info.peer;
(...skipping 11 matching lines...) Expand all
407 status.os_error()); 408 status.os_error());
408 if (new_peer) { 409 if (new_peer) {
409 request_info.peer = new_peer; 410 request_info.peer = new_peer;
410 peer = new_peer; 411 peer = new_peer;
411 } 412 }
412 } 413 }
413 414
414 // The request ID will be removed from our pending list in the destructor. 415 // The request ID will be removed from our pending list in the destructor.
415 // Normally, dispatching this message causes the reference-counted request to 416 // Normally, dispatching this message causes the reference-counted request to
416 // die immediately. 417 // die immediately.
417 peer->OnCompletedRequest(status); 418 peer->OnCompletedRequest(status, security_info);
418 419
419 webkit_glue::NotifyCacheStats(); 420 webkit_glue::NotifyCacheStats();
420 } 421 }
421 422
422 int ResourceDispatcher::AddPendingRequest( 423 int ResourceDispatcher::AddPendingRequest(
423 webkit_glue::ResourceLoaderBridge::Peer* callback, 424 webkit_glue::ResourceLoaderBridge::Peer* callback,
424 ResourceType::Type resource_type, 425 ResourceType::Type resource_type,
425 bool mixed_content) { 426 bool mixed_content) {
426 // Compute a unique request_id for this renderer process. 427 // Compute a unique request_id for this renderer process.
427 int id = MakeRequestID(); 428 int id = MakeRequestID();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 case ViewMsg_Resource_RequestComplete::ID: 513 case ViewMsg_Resource_RequestComplete::ID:
513 return true; 514 return true;
514 515
515 default: 516 default:
516 break; 517 break;
517 } 518 }
518 519
519 return false; 520 return false;
520 } 521 }
521 522
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698