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

Side by Side Diff: content/browser/storage_partition_impl_map.cc

Issue 1862203005: Remove ContentBrowserClient::CreateRequestContext & CreateRequestContextForStoragePartition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 #include "content/browser/storage_partition_impl_map.h" 5 #include "content/browser/storage_partition_impl_map.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 request_interceptors.push_back( 452 request_interceptors.push_back(
453 ForeignFetchRequestHandler::CreateInterceptor( 453 ForeignFetchRequestHandler::CreateInterceptor(
454 browser_context_->GetResourceContext()) 454 browser_context_->GetResourceContext())
455 .release()); 455 .release());
456 } 456 }
457 request_interceptors.push_back(new AppCacheInterceptor()); 457 request_interceptors.push_back(new AppCacheInterceptor());
458 458
459 // These calls must happen after StoragePartitionImpl::Create(). 459 // These calls must happen after StoragePartitionImpl::Create().
460 if (partition_domain.empty()) { 460 if (partition_domain.empty()) {
461 partition->SetURLRequestContext( 461 partition->SetURLRequestContext(
462 GetContentClient()->browser()->CreateRequestContext( 462 browser_context_->CreateRequestContext(
463 browser_context_, &protocol_handlers, 463 &protocol_handlers, std::move(request_interceptors)));
464 std::move(request_interceptors)));
465 } else { 464 } else {
466 partition->SetURLRequestContext( 465 partition->SetURLRequestContext(
467 GetContentClient()->browser()->CreateRequestContextForStoragePartition( 466 browser_context_->CreateRequestContextForStoragePartition(
468 browser_context_, partition->GetPath(), in_memory, 467 partition->GetPath(), in_memory, &protocol_handlers,
469 &protocol_handlers, std::move(request_interceptors))); 468 std::move(request_interceptors)));
470 } 469 }
471 partition->SetMediaURLRequestContext( 470 partition->SetMediaURLRequestContext(
472 partition_domain.empty() ? 471 partition_domain.empty() ?
473 browser_context_->GetMediaRequestContext() : 472 browser_context_->GetMediaRequestContext() :
474 browser_context_->GetMediaRequestContextForStoragePartition( 473 browser_context_->GetMediaRequestContextForStoragePartition(
475 partition->GetPath(), in_memory)); 474 partition->GetPath(), in_memory));
476 475
477 PostCreateInitialization(partition, in_memory); 476 PostCreateInitialization(partition, in_memory);
478 477
479 return partition; 478 return partition;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 609
611 // We do not call InitializeURLRequestContext() for media contexts because, 610 // We do not call InitializeURLRequestContext() for media contexts because,
612 // other than the HTTP cache, the media contexts share the same backing 611 // other than the HTTP cache, the media contexts share the same backing
613 // objects as their associated "normal" request context. Thus, the previous 612 // objects as their associated "normal" request context. Thus, the previous
614 // call serves to initialize the media request context for this storage 613 // call serves to initialize the media request context for this storage
615 // partition as well. 614 // partition as well.
616 } 615 }
617 } 616 }
618 617
619 } // namespace content 618 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698