OLD | NEW |
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 // 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/child/resource_dispatcher.h" | 7 #include "content/child/resource_dispatcher.h" |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 | 467 |
468 main_thread_task_runner_->PostTask( | 468 main_thread_task_runner_->PostTask( |
469 FROM_HERE, base::Bind(&ResourceDispatcher::FlushDeferredMessages, | 469 FROM_HERE, base::Bind(&ResourceDispatcher::FlushDeferredMessages, |
470 weak_factory_.GetWeakPtr(), request_id)); | 470 weak_factory_.GetWeakPtr(), request_id)); |
471 } | 471 } |
472 } | 472 } |
473 | 473 |
474 void ResourceDispatcher::DidChangePriority(int request_id, | 474 void ResourceDispatcher::DidChangePriority(int request_id, |
475 net::RequestPriority new_priority, | 475 net::RequestPriority new_priority, |
476 int intra_priority_value) { | 476 int intra_priority_value) { |
477 DCHECK(ContainsKey(pending_requests_, request_id)); | 477 DCHECK(base::ContainsKey(pending_requests_, request_id)); |
478 message_sender_->Send(new ResourceHostMsg_DidChangePriority( | 478 message_sender_->Send(new ResourceHostMsg_DidChangePriority( |
479 request_id, new_priority, intra_priority_value)); | 479 request_id, new_priority, intra_priority_value)); |
480 } | 480 } |
481 | 481 |
482 ResourceDispatcher::PendingRequestInfo::PendingRequestInfo( | 482 ResourceDispatcher::PendingRequestInfo::PendingRequestInfo( |
483 std::unique_ptr<RequestPeer> peer, | 483 std::unique_ptr<RequestPeer> peer, |
484 ResourceType resource_type, | 484 ResourceType resource_type, |
485 int origin_pid, | 485 int origin_pid, |
486 const GURL& frame_origin, | 486 const GURL& frame_origin, |
487 const GURL& request_url, | 487 const GURL& request_url, |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 *frame_origin = extra_data->frame_origin(); | 812 *frame_origin = extra_data->frame_origin(); |
813 return request; | 813 return request; |
814 } | 814 } |
815 | 815 |
816 void ResourceDispatcher::SetResourceSchedulingFilter( | 816 void ResourceDispatcher::SetResourceSchedulingFilter( |
817 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { | 817 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { |
818 resource_scheduling_filter_ = resource_scheduling_filter; | 818 resource_scheduling_filter_ = resource_scheduling_filter; |
819 } | 819 } |
820 | 820 |
821 } // namespace content | 821 } // namespace content |
OLD | NEW |