Chromium Code Reviews| 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading |
| 6 | 6 |
| 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 536 void ResourceDispatcherHostImpl::SetDelegate( | 536 void ResourceDispatcherHostImpl::SetDelegate( |
| 537 ResourceDispatcherHostDelegate* delegate) { | 537 ResourceDispatcherHostDelegate* delegate) { |
| 538 delegate_ = delegate; | 538 delegate_ = delegate; |
| 539 } | 539 } |
| 540 | 540 |
| 541 void ResourceDispatcherHostImpl::SetAllowCrossOriginAuthPrompt(bool value) { | 541 void ResourceDispatcherHostImpl::SetAllowCrossOriginAuthPrompt(bool value) { |
| 542 allow_cross_origin_auth_prompt_ = value; | 542 allow_cross_origin_auth_prompt_ = value; |
| 543 } | 543 } |
| 544 | 544 |
| 545 void ResourceDispatcherHostImpl::AddResourceContext(ResourceContext* context) { | 545 void ResourceDispatcherHostImpl::AddResourceContext(ResourceContext* context) { |
| 546 DCHECK_CURRENTLY_ON(BrowserThread::IO); | |
|
mmenke
2016/01/21 16:33:34
May want to add a DCHECK to RemoveResourceContext
Anand Mistry (off Chromium)
2016/01/21 19:41:52
The reason I didn't is because of the comment abou
| |
| 546 active_resource_contexts_.insert(context); | 547 active_resource_contexts_.insert(context); |
| 547 } | 548 } |
| 548 | 549 |
| 549 void ResourceDispatcherHostImpl::RemoveResourceContext( | 550 void ResourceDispatcherHostImpl::RemoveResourceContext( |
| 550 ResourceContext* context) { | 551 ResourceContext* context) { |
| 551 CHECK(ContainsKey(active_resource_contexts_, context)); | 552 CHECK(ContainsKey(active_resource_contexts_, context)); |
| 552 active_resource_contexts_.erase(context); | 553 active_resource_contexts_.erase(context); |
| 553 } | 554 } |
| 554 | 555 |
| 555 void ResourceDispatcherHostImpl::CancelRequestsForContext( | 556 void ResourceDispatcherHostImpl::CancelRequestsForContext( |
| (...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2552 load_flags |= net::LOAD_PREFETCH; | 2553 load_flags |= net::LOAD_PREFETCH; |
| 2553 } | 2554 } |
| 2554 | 2555 |
| 2555 if (is_sync_load) | 2556 if (is_sync_load) |
| 2556 load_flags |= net::LOAD_IGNORE_LIMITS; | 2557 load_flags |= net::LOAD_IGNORE_LIMITS; |
| 2557 | 2558 |
| 2558 return load_flags; | 2559 return load_flags; |
| 2559 } | 2560 } |
| 2560 | 2561 |
| 2561 } // namespace content | 2562 } // namespace content |
| OLD | NEW |