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