| 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 #include <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 | 205 |
| 206 // This is used to emulate different sub-processes, since this filter will | 206 // This is used to emulate different sub-processes, since this filter will |
| 207 // have a different ID than the original. | 207 // have a different ID than the original. |
| 208 class TestFilter : public ResourceMessageFilter { | 208 class TestFilter : public ResourceMessageFilter { |
| 209 public: | 209 public: |
| 210 explicit TestFilter(ResourceContext* resource_context) | 210 explicit TestFilter(ResourceContext* resource_context) |
| 211 : ResourceMessageFilter( | 211 : ResourceMessageFilter( |
| 212 ChildProcessHostImpl::GenerateChildProcessUniqueId(), | 212 ChildProcessHostImpl::GenerateChildProcessUniqueId(), |
| 213 PROCESS_TYPE_RENDERER, NULL, NULL, NULL, NULL, | 213 PROCESS_TYPE_RENDERER, NULL, NULL, NULL, NULL, NULL, |
| 214 base::Bind(&TestFilter::GetContexts, base::Unretained(this))), | 214 base::Bind(&TestFilter::GetContexts, base::Unretained(this))), |
| 215 resource_context_(resource_context), | 215 resource_context_(resource_context), |
| 216 canceled_(false), | 216 canceled_(false), |
| 217 received_after_canceled_(0) { | 217 received_after_canceled_(0) { |
| 218 ChildProcessSecurityPolicyImpl::GetInstance()->Add(child_id()); | 218 ChildProcessSecurityPolicyImpl::GetInstance()->Add(child_id()); |
| 219 set_peer_pid_for_testing(base::GetCurrentProcId()); | 219 set_peer_pid_for_testing(base::GetCurrentProcId()); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void set_canceled(bool canceled) { canceled_ = canceled; } | 222 void set_canceled(bool canceled) { canceled_ = canceled; } |
| 223 int received_after_canceled() const { return received_after_canceled_; } | 223 int received_after_canceled() const { return received_after_canceled_; } |
| (...skipping 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3016 return nullptr; | 3016 return nullptr; |
| 3017 } | 3017 } |
| 3018 | 3018 |
| 3019 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse( | 3019 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse( |
| 3020 net::URLRequest* request, | 3020 net::URLRequest* request, |
| 3021 net::NetworkDelegate* network_delegate) const { | 3021 net::NetworkDelegate* network_delegate) const { |
| 3022 return nullptr; | 3022 return nullptr; |
| 3023 } | 3023 } |
| 3024 | 3024 |
| 3025 } // namespace content | 3025 } // namespace content |
| OLD | NEW |