| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 #include "content/child/resource_scheduling_filter.h" | 5 #include "content/child/resource_scheduling_filter.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "content/child/resource_dispatcher.h" | 9 #include "content/child/resource_dispatcher.h" |
| 10 #include "content/common/resource_messages.h" | 10 #include "content/common/resource_messages.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 request_id_to_task_runner_map_.insert( | 84 request_id_to_task_runner_map_.insert( |
| 85 std::make_pair(id, web_task_runner.Pass())); | 85 std::make_pair(id, web_task_runner.Pass())); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void ResourceSchedulingFilter::ClearRequestIdTaskRunner(int id) { | 88 void ResourceSchedulingFilter::ClearRequestIdTaskRunner(int id) { |
| 89 base::AutoLock lock(request_id_to_task_runner_map_lock_); | 89 base::AutoLock lock(request_id_to_task_runner_map_lock_); |
| 90 request_id_to_task_runner_map_.erase(id); | 90 request_id_to_task_runner_map_.erase(id); |
| 91 } | 91 } |
| 92 | 92 |
| 93 bool ResourceSchedulingFilter::GetSupportedMessageClasses( | 93 bool ResourceSchedulingFilter::GetSupportedMessageClasses( |
| 94 std::vector<uint32>* supported_message_classes) const { | 94 std::vector<uint32_t>* supported_message_classes) const { |
| 95 supported_message_classes->push_back(ResourceMsgStart); | 95 supported_message_classes->push_back(ResourceMsgStart); |
| 96 return true; | 96 return true; |
| 97 } | 97 } |
| 98 | 98 |
| 99 void ResourceSchedulingFilter::DispatchMessage(const IPC::Message& message) { | 99 void ResourceSchedulingFilter::DispatchMessage(const IPC::Message& message) { |
| 100 resource_dispatcher_->OnMessageReceived(message); | 100 resource_dispatcher_->OnMessageReceived(message); |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace content | 103 } // namespace content |
| OLD | NEW |