Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 1600263002: Post a task to the IO thread to add a ResourceContext in ResourceDispatcherHostImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/resource_context_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/resource_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698