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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 void ResourceDispatcherHostImpl::SetDelegate( | 537 void ResourceDispatcherHostImpl::SetDelegate( |
538 ResourceDispatcherHostDelegate* delegate) { | 538 ResourceDispatcherHostDelegate* delegate) { |
539 delegate_ = delegate; | 539 delegate_ = delegate; |
540 } | 540 } |
541 | 541 |
542 void ResourceDispatcherHostImpl::SetAllowCrossOriginAuthPrompt(bool value) { | 542 void ResourceDispatcherHostImpl::SetAllowCrossOriginAuthPrompt(bool value) { |
543 allow_cross_origin_auth_prompt_ = value; | 543 allow_cross_origin_auth_prompt_ = value; |
544 } | 544 } |
545 | 545 |
546 void ResourceDispatcherHostImpl::AddResourceContext(ResourceContext* context) { | 546 void ResourceDispatcherHostImpl::AddResourceContext(ResourceContext* context) { |
| 547 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
547 active_resource_contexts_.insert(context); | 548 active_resource_contexts_.insert(context); |
548 } | 549 } |
549 | 550 |
550 void ResourceDispatcherHostImpl::RemoveResourceContext( | 551 void ResourceDispatcherHostImpl::RemoveResourceContext( |
551 ResourceContext* context) { | 552 ResourceContext* context) { |
552 CHECK(ContainsKey(active_resource_contexts_, context)); | 553 CHECK(ContainsKey(active_resource_contexts_, context)); |
553 active_resource_contexts_.erase(context); | 554 active_resource_contexts_.erase(context); |
554 } | 555 } |
555 | 556 |
556 void ResourceDispatcherHostImpl::CancelRequestsForContext( | 557 void ResourceDispatcherHostImpl::CancelRequestsForContext( |
(...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2559 load_flags |= net::LOAD_PREFETCH; | 2560 load_flags |= net::LOAD_PREFETCH; |
2560 } | 2561 } |
2561 | 2562 |
2562 if (is_sync_load) | 2563 if (is_sync_load) |
2563 load_flags |= net::LOAD_IGNORE_LIMITS; | 2564 load_flags |= net::LOAD_IGNORE_LIMITS; |
2564 | 2565 |
2565 return load_flags; | 2566 return load_flags; |
2566 } | 2567 } |
2567 | 2568 |
2568 } // namespace content | 2569 } // namespace content |
OLD | NEW |