OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/common/resource_dispatcher.h" | 7 #include "content/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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 } | 423 } |
424 | 424 |
425 void ResourceDispatcher::FollowPendingRedirect( | 425 void ResourceDispatcher::FollowPendingRedirect( |
426 int request_id, | 426 int request_id, |
427 PendingRequestInfo& request_info) { | 427 PendingRequestInfo& request_info) { |
428 IPC::Message* msg = request_info.pending_redirect_message.release(); | 428 IPC::Message* msg = request_info.pending_redirect_message.release(); |
429 if (msg) | 429 if (msg) |
430 message_sender()->Send(msg); | 430 message_sender()->Send(msg); |
431 } | 431 } |
432 | 432 |
433 void ResourceDispatcher::OnRequestComplete(int request_id, | 433 void ResourceDispatcher::OnRequestComplete( |
434 const net::URLRequestStatus& status, | 434 int request_id, |
435 const std::string& security_info, | 435 const net::URLRequestStatus& status, |
436 const base::Time& completion_time) { | 436 const std::string& security_info, |
| 437 const base::TimeTicks& completion_time) { |
437 PendingRequestInfo* request_info = GetPendingRequestInfo(request_id); | 438 PendingRequestInfo* request_info = GetPendingRequestInfo(request_id); |
438 if (!request_info) | 439 if (!request_info) |
439 return; | 440 return; |
440 | 441 |
441 webkit_glue::ResourceLoaderBridge::Peer* peer = request_info->peer; | 442 webkit_glue::ResourceLoaderBridge::Peer* peer = request_info->peer; |
442 | 443 |
443 if (delegate_) { | 444 if (delegate_) { |
444 webkit_glue::ResourceLoaderBridge::Peer* new_peer = | 445 webkit_glue::ResourceLoaderBridge::Peer* new_peer = |
445 delegate_->OnRequestComplete( | 446 delegate_->OnRequestComplete( |
446 request_info->peer, request_info->resource_type, status); | 447 request_info->peer, request_info->resource_type, status); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 | 606 |
606 // static | 607 // static |
607 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { | 608 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { |
608 while (!queue->empty()) { | 609 while (!queue->empty()) { |
609 IPC::Message* message = queue->front(); | 610 IPC::Message* message = queue->front(); |
610 ReleaseResourcesInDataMessage(*message); | 611 ReleaseResourcesInDataMessage(*message); |
611 queue->pop_front(); | 612 queue->pop_front(); |
612 delete message; | 613 delete message; |
613 } | 614 } |
614 } | 615 } |
OLD | NEW |