Commit d8ec149f authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Jumbo compile fix: renamed two content/browser symbols

Recent additions created duplicate symbols in content/browser
of the variable g_url_loader_factory_callback_for_test and of
the method BlobStorageContextGetter. BlobStorageContextGetter is
a duplicate method but small enough that it's probably ok.

This renames one BlobStorageContextGetter to
BlobStorageContextGetterForStorage (lacking a suitable place for
sharing the method) and one of the
g_url_loader_factory_callback_for_test variables to
g_create_network_factory_callback_for_test to better describe what it
contains.

These errors don't appear in the jumbo configurations covered by
the bots because the files are far enough apart in file lists
to normally not be grouped with each other.

Change-Id: I17ecc36d2271c71f6b7affcc41ef4935b107743f
Reviewed-on: https://chromium-review.googlesource.com/915367
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536987}
parent 45ca522c
...@@ -208,7 +208,7 @@ base::LazyInstance<RoutingIDFrameMap>::DestructorAtExit g_routing_id_frame_map = ...@@ -208,7 +208,7 @@ base::LazyInstance<RoutingIDFrameMap>::DestructorAtExit g_routing_id_frame_map =
LAZY_INSTANCE_INITIALIZER; LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<RenderFrameHostImpl::CreateNetworkFactoryCallback>::Leaky base::LazyInstance<RenderFrameHostImpl::CreateNetworkFactoryCallback>::Leaky
g_url_loader_factory_callback_for_test = LAZY_INSTANCE_INITIALIZER; g_create_network_factory_callback_for_test = LAZY_INSTANCE_INITIALIZER;
using TokenFrameMap = base::hash_map<base::UnguessableToken, using TokenFrameMap = base::hash_map<base::UnguessableToken,
RenderFrameHostImpl*, RenderFrameHostImpl*,
...@@ -460,14 +460,15 @@ RenderFrameHostImpl* RenderFrameHostImpl::FromOverlayRoutingToken( ...@@ -460,14 +460,15 @@ RenderFrameHostImpl* RenderFrameHostImpl::FromOverlayRoutingToken(
// static // static
void RenderFrameHostImpl::SetNetworkFactoryForTesting( void RenderFrameHostImpl::SetNetworkFactoryForTesting(
const CreateNetworkFactoryCallback& url_loader_factory_callback) { const CreateNetworkFactoryCallback& create_network_factory_callback) {
DCHECK(!BrowserThread::IsThreadInitialized(BrowserThread::UI) || DCHECK(!BrowserThread::IsThreadInitialized(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::UI)); BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(url_loader_factory_callback.is_null() || DCHECK(create_network_factory_callback.is_null() ||
g_url_loader_factory_callback_for_test.Get().is_null()) g_create_network_factory_callback_for_test.Get().is_null())
<< "It is not expected that this is called with non-null callback when " << "It is not expected that this is called with non-null callback when "
<< "another overriding callback is already set."; << "another overriding callback is already set.";
g_url_loader_factory_callback_for_test.Get() = url_loader_factory_callback; g_create_network_factory_callback_for_test.Get() =
create_network_factory_callback;
} }
RenderFrameHostImpl::RenderFrameHostImpl(SiteInstance* site_instance, RenderFrameHostImpl::RenderFrameHostImpl(SiteInstance* site_instance,
...@@ -4107,14 +4108,14 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve( ...@@ -4107,14 +4108,14 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve(
this, false /* is_navigation */, &default_factory_request); this, false /* is_navigation */, &default_factory_request);
StoragePartitionImpl* storage_partition = static_cast<StoragePartitionImpl*>( StoragePartitionImpl* storage_partition = static_cast<StoragePartitionImpl*>(
BrowserContext::GetStoragePartition(context, GetSiteInstance())); BrowserContext::GetStoragePartition(context, GetSiteInstance()));
if (g_url_loader_factory_callback_for_test.Get().is_null()) { if (g_create_network_factory_callback_for_test.Get().is_null()) {
storage_partition->GetNetworkContext()->CreateURLLoaderFactory( storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
std::move(default_factory_request), GetProcess()->GetID()); std::move(default_factory_request), GetProcess()->GetID());
} else { } else {
network::mojom::URLLoaderFactoryPtr original_factory; network::mojom::URLLoaderFactoryPtr original_factory;
storage_partition->GetNetworkContext()->CreateURLLoaderFactory( storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
mojo::MakeRequest(&original_factory), GetProcess()->GetID()); mojo::MakeRequest(&original_factory), GetProcess()->GetID());
g_url_loader_factory_callback_for_test.Get().Run( g_create_network_factory_callback_for_test.Get().Run(
std::move(default_factory_request), GetProcess()->GetID(), std::move(default_factory_request), GetProcess()->GetID(),
original_factory.PassInterface()); original_factory.PassInterface());
} }
......
...@@ -250,7 +250,7 @@ void ClearSessionStorageOnUIThread( ...@@ -250,7 +250,7 @@ void ClearSessionStorageOnUIThread(
callback)); callback));
} }
base::WeakPtr<storage::BlobStorageContext> BlobStorageContextGetter( base::WeakPtr<storage::BlobStorageContext> BlobStorageContextGetterForStorage(
scoped_refptr<ChromeBlobStorageContext> blob_context) { scoped_refptr<ChromeBlobStorageContext> blob_context) {
DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK_CURRENTLY_ON(BrowserThread::IO);
return blob_context->context()->AsWeakPtr(); return blob_context->context()->AsWeakPtr();
...@@ -611,7 +611,7 @@ std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create( ...@@ -611,7 +611,7 @@ std::unique_ptr<StoragePartitionImpl> StoragePartitionImpl::Create(
if (base::FeatureList::IsEnabled(network::features::kNetworkService)) { if (base::FeatureList::IsEnabled(network::features::kNetworkService)) {
BlobURLLoaderFactory::BlobContextGetter blob_getter = BlobURLLoaderFactory::BlobContextGetter blob_getter =
base::BindOnce(&BlobStorageContextGetter, blob_context); base::BindOnce(&BlobStorageContextGetterForStorage, blob_context);
partition->blob_url_loader_factory_ = partition->blob_url_loader_factory_ =
BlobURLLoaderFactory::Create(std::move(blob_getter)); BlobURLLoaderFactory::Create(std::move(blob_getter));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment