New issue
Advanced search Search tips

Issue 829251 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 828331
issue 830291
issue 830292



Sign in to add a comment

NetS13nServiceWorker: Prepare NetworkContext in a proper way/timing

Project Member Reported by shimazu@chromium.org, Apr 5 2018

Issue description

NetworkContext should be initialized so that NetS13nServiceWorker can use URLLoaderFactoryGetter.
The timing is difficult since 
URLLoaderFactoryGetter::Initialize calls StoragePartition::GetNetworkContext(), and it calls StoagePartition::NetworkContextOwner::Initialize. NetworkContextOwner::Initialize needs URLRequestContextGetter but it's set slightly later. We need to refine them somehow.
 
Blocking: 830291
Blocking: 830292
Issue 827928 has been merged into this issue.
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c6e1a05ecae9e4189c280d6a30a7e44439fbc82

commit 4c6e1a05ecae9e4189c280d6a30a7e44439fbc82
Author: Makoto Shimazu <shimazu@chromium.org>
Date: Wed Apr 25 01:00:46 2018

NetS13nSW: Initialize URLLoaderFactoryGetter properly

Previously, URLLoaderFactoryGetter expects that the NetworkContext is ready when
it's initialized (URLLoaderFactoryGetter::Initialize()). However, when
ServiceWorkerServicification is on without NetworkService, the initialization
fails because URLRequestContext which is necessary to create a dummy
NetworkContext is not set at that point.
This CL splits the initialization process into two parts: creating valid
InterfacePtrs (URLLoaderFactoryGetter::Initialize()) and passing the
InterfaceRequests to the appropriate places
(URLLoaderFactoryGetter::EstablishConnection()).  NetworkContext is used only
for the latter, so EstablishConnection() is called after URLRequestContext is
set if ServiceWorkerServicification is on without NetworkService.

Bug:  829251 
Change-Id: I5fbbaa2d48232965681fc96d802711369cd96528
Reviewed-on: https://chromium-review.googlesource.com/1025490
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553405}
[modify] https://crrev.com/4c6e1a05ecae9e4189c280d6a30a7e44439fbc82/content/browser/storage_partition_impl_map.cc
[modify] https://crrev.com/4c6e1a05ecae9e4189c280d6a30a7e44439fbc82/content/browser/url_loader_factory_getter.cc
[modify] https://crrev.com/4c6e1a05ecae9e4189c280d6a30a7e44439fbc82/content/browser/url_loader_factory_getter.h

Status: Fixed (was: Assigned)

Sign in to add a comment