| 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 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 5 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/process_util.h" | 12 #include "base/process_util.h" |
| 13 #include "content/browser/browser_thread_impl.h" | 13 #include "content/browser/browser_thread_impl.h" |
| 14 #include "content/browser/child_process_security_policy.h" | 14 #include "content/browser/child_process_security_policy.h" |
| 15 #include "content/browser/download/download_id.h" | 15 #include "content/browser/download/download_id.h" |
| 16 #include "content/browser/download/download_id_factory.h" | 16 #include "content/browser/download/download_id_factory.h" |
| 17 #include "content/browser/download/download_manager.h" |
| 17 #include "content/browser/mock_resource_context.h" | 18 #include "content/browser/mock_resource_context.h" |
| 18 #include "content/browser/renderer_host/dummy_resource_handler.h" | 19 #include "content/browser/renderer_host/dummy_resource_handler.h" |
| 19 #include "content/browser/renderer_host/global_request_id.h" | 20 #include "content/browser/renderer_host/global_request_id.h" |
| 20 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 21 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 21 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 22 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
| 22 #include "content/browser/renderer_host/resource_handler.h" | 23 #include "content/browser/renderer_host/resource_handler.h" |
| 23 #include "content/browser/renderer_host/resource_message_filter.h" | 24 #include "content/browser/renderer_host/resource_message_filter.h" |
| 24 #include "content/common/resource_messages.h" | 25 #include "content/common/resource_messages.h" |
| 25 #include "content/common/resource_response.h" | 26 #include "content/common/resource_response.h" |
| 26 #include "content/common/view_messages.h" | 27 #include "content/common/view_messages.h" |
| (...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 EXPECT_EQ(1, host_.pending_requests()); | 1226 EXPECT_EQ(1, host_.pending_requests()); |
| 1226 | 1227 |
| 1227 // Cancelling by other methods shouldn't work either. | 1228 // Cancelling by other methods shouldn't work either. |
| 1228 host_.CancelRequestsForProcess(render_view_id); | 1229 host_.CancelRequestsForProcess(render_view_id); |
| 1229 EXPECT_EQ(1, host_.pending_requests()); | 1230 EXPECT_EQ(1, host_.pending_requests()); |
| 1230 | 1231 |
| 1231 // Cancelling by context should work. | 1232 // Cancelling by context should work. |
| 1232 host_.CancelRequestsForContext(&filter_->resource_context()); | 1233 host_.CancelRequestsForContext(&filter_->resource_context()); |
| 1233 EXPECT_EQ(0, host_.pending_requests()); | 1234 EXPECT_EQ(0, host_.pending_requests()); |
| 1234 } | 1235 } |
| OLD | NEW |