| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/loader/async_revalidation_manager.h" | 5 #include "content/browser/loader/async_revalidation_manager.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 class BlackholeFilter : public ResourceMessageFilter { | 205 class BlackholeFilter : public ResourceMessageFilter { |
| 206 public: | 206 public: |
| 207 explicit BlackholeFilter(ResourceContext* resource_context) | 207 explicit BlackholeFilter(ResourceContext* resource_context) |
| 208 : ResourceMessageFilter( | 208 : ResourceMessageFilter( |
| 209 ChildProcessHostImpl::GenerateChildProcessUniqueId(), | 209 ChildProcessHostImpl::GenerateChildProcessUniqueId(), |
| 210 PROCESS_TYPE_RENDERER, | 210 PROCESS_TYPE_RENDERER, |
| 211 nullptr, | 211 nullptr, |
| 212 nullptr, | 212 nullptr, |
| 213 nullptr, | 213 nullptr, |
| 214 nullptr, | 214 nullptr, |
| 215 nullptr, | |
| 216 base::Bind(&BlackholeFilter::GetContexts, base::Unretained(this))), | 215 base::Bind(&BlackholeFilter::GetContexts, base::Unretained(this))), |
| 217 resource_context_(resource_context) { | 216 resource_context_(resource_context) { |
| 218 ChildProcessSecurityPolicyImpl::GetInstance()->Add(child_id()); | 217 ChildProcessSecurityPolicyImpl::GetInstance()->Add(child_id()); |
| 219 } | 218 } |
| 220 | 219 |
| 221 bool Send(IPC::Message* msg) override { | 220 bool Send(IPC::Message* msg) override { |
| 222 std::unique_ptr<IPC::Message> take_ownership(msg); | 221 std::unique_ptr<IPC::Message> take_ownership(msg); |
| 223 ReleaseHandlesInMessage(*msg); | 222 ReleaseHandlesInMessage(*msg); |
| 224 return true; | 223 return true; |
| 225 } | 224 } |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 // already completed. | 548 // already completed. |
| 550 EXPECT_TRUE(NextRequestWasDestroyed()); | 549 EXPECT_TRUE(NextRequestWasDestroyed()); |
| 551 | 550 |
| 552 // But no others. | 551 // But no others. |
| 553 EXPECT_TRUE(IsEmpty()); | 552 EXPECT_TRUE(IsEmpty()); |
| 554 } | 553 } |
| 555 | 554 |
| 556 } // namespace | 555 } // namespace |
| 557 | 556 |
| 558 } // namespace content | 557 } // namespace content |
| OLD | NEW |