| Index: content/common/resource_dispatcher.cc
|
| diff --git a/content/common/resource_dispatcher.cc b/content/common/resource_dispatcher.cc
|
| index ce49f4e133b1f5fe7803db278b160627de6edd27..45109670f2339fa3c2f9493154ab36d68403d6a8 100644
|
| --- a/content/common/resource_dispatcher.cc
|
| +++ b/content/common/resource_dispatcher.cc
|
| @@ -22,6 +22,7 @@
|
| #include "content/public/common/resource_response.h"
|
| #include "net/base/net_errors.h"
|
| #include "net/base/net_util.h"
|
| +#include "net/base/request_priority.h"
|
| #include "net/http/http_response_headers.h"
|
| #include "webkit/glue/resource_request_body.h"
|
| #include "webkit/glue/resource_type.h"
|
| @@ -62,6 +63,7 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge {
|
| virtual bool Start(Peer* peer) OVERRIDE;
|
| virtual void Cancel() OVERRIDE;
|
| virtual void SetDefersLoading(bool value) OVERRIDE;
|
| + virtual void DidChangePriority(net::RequestPriority new_priority) OVERRIDE;
|
| virtual void SyncLoad(SyncLoadResponse* response) OVERRIDE;
|
|
|
| private:
|
| @@ -193,6 +195,16 @@ void IPCResourceLoaderBridge::SetDefersLoading(bool value) {
|
| dispatcher_->SetDefersLoading(request_id_, value);
|
| }
|
|
|
| +void IPCResourceLoaderBridge::DidChangePriority(
|
| + net::RequestPriority new_priority) {
|
| + if (request_id_ < 0) {
|
| + NOTREACHED() << "Trying to change priority of an unstarted request";
|
| + return;
|
| + }
|
| +
|
| + dispatcher_->DidChangePriority(routing_id_, request_id_, new_priority);
|
| +}
|
| +
|
| void IPCResourceLoaderBridge::SyncLoad(SyncLoadResponse* response) {
|
| if (request_id_ != -1) {
|
| NOTREACHED() << "Starting a request twice";
|
| @@ -549,6 +561,13 @@ void ResourceDispatcher::SetDefersLoading(int request_id, bool value) {
|
| }
|
| }
|
|
|
| +void ResourceDispatcher::DidChangePriority(
|
| + int routing_id, int request_id, net::RequestPriority new_priority) {
|
| + DCHECK(ContainsKey(pending_requests_, request_id));
|
| + message_sender()->Send(new ResourceHostMsg_DidChangePriority(
|
| + routing_id, request_id, new_priority));
|
| +}
|
| +
|
| ResourceDispatcher::PendingRequestInfo::PendingRequestInfo()
|
| : peer(NULL),
|
| resource_type(ResourceType::SUB_RESOURCE),
|
|
|