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

Issue 1217563005: Create unique HttpNetworkSession for storage partition. (Closed)

Created:
5 years, 5 months ago by wjmaclean
Modified:
5 years, 3 months ago
Reviewers:
davidben
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create unique HttpNetworkSession for storage partition. This CL provides an isolated HttpNetWork session for apps/webview. It creates a separate network session, along with isolated versions of the necessary ancillary objects. BUG=291417

Patch Set 1 #

Patch Set 2 : Fix compile on Windows/Android. #

Patch Set 3 : Add test; need to resolve bug. #

Patch Set 4 : Network session check should run on IO thread. #

Patch Set 5 : Add isolated HostResolver. #

Patch Set 6 : Wired up remaining state for HttpNetworkSession. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -4 lines) Patch
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 2 chunks +40 lines, -3 lines 1 comment Download
M chrome/browser/profiles/profile_io_data.h View 1 2 3 4 5 2 chunks +24 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 2 chunks +44 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc View 1 2 3 4 3 chunks +23 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 23 (5 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1217563005/40001
5 years, 5 months ago (2015-06-28 18:50:45 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-06-28 20:45:15 UTC) #5
wjmaclean
Not looking for a review for this (yet), but just wanted to share it as ...
5 years, 5 months ago (2015-07-02 17:10:35 UTC) #6
wjmaclean
davidben@ mmenke@ - please take a look and let me know if this looks like ...
5 years, 5 months ago (2015-07-09 15:14:51 UTC) #8
mmenke
This is just seems very fragile and ugly (No offense - the existing code to ...
5 years, 5 months ago (2015-07-09 15:42:48 UTC) #9
mmenke
On 2015/07/09 15:42:48, mmenke wrote: > This is just seems very fragile and ugly (No ...
5 years, 5 months ago (2015-07-09 16:14:38 UTC) #10
wjmaclean
On 2015/07/09 16:14:38, mmenke wrote: > On 2015/07/09 15:42:48, mmenke wrote: > > This is ...
5 years, 5 months ago (2015-07-09 16:19:57 UTC) #11
mmenke
On 2015/07/09 16:19:57, wjmaclean wrote: > On 2015/07/09 16:14:38, mmenke wrote: > > On 2015/07/09 ...
5 years, 5 months ago (2015-07-09 18:36:54 UTC) #12
Ryan Sleevi
On 2015/07/09 18:36:54, mmenke wrote: > Note that I haven't thought a whole lot about ...
5 years, 5 months ago (2015-07-09 19:46:51 UTC) #13
mmenke
On 2015/07/09 19:46:51, Ryan Sleevi (slow through 7-15 wrote: > On 2015/07/09 18:36:54, mmenke wrote: ...
5 years, 5 months ago (2015-07-09 19:50:22 UTC) #14
wjmaclean
On 2015/07/09 19:50:22, mmenke wrote: > On 2015/07/09 19:46:51, Ryan Sleevi (slow through 7-15 wrote: ...
5 years, 5 months ago (2015-07-15 19:36:49 UTC) #15
mmenke
On Wed, Jul 15, 2015 at 3:36 PM, <wjmaclean@chromium.org> wrote: > On 2015/07/09 19:50:22, mmenke ...
5 years, 5 months ago (2015-07-15 19:41:34 UTC) #16
wjmaclean
On 2015/07/15 19:41:34, mmenke wrote: > > What do we get out of making Build ...
5 years, 5 months ago (2015-07-15 19:48:48 UTC) #17
mmenke
On Wed, Jul 15, 2015 at 3:48 PM, <wjmaclean@chromium.org> wrote: > On 2015/07/15 19:41:34, mmenke ...
5 years, 5 months ago (2015-07-15 20:32:12 UTC) #18
mmenke
Sorry, lost context here... So the way I thinking we could do this is make ...
5 years, 5 months ago (2015-07-15 21:03:58 UTC) #19
wjmaclean
On 2015/07/15 21:03:58, mmenke wrote: > Sorry, lost context here... > > So the way ...
5 years, 5 months ago (2015-07-16 20:11:54 UTC) #20
mmenke
On 2015/07/16 20:11:54, wjmaclean wrote: > On 2015/07/15 21:03:58, mmenke wrote: > > Sorry, lost ...
5 years, 3 months ago (2015-09-11 17:05:31 UTC) #21
wjmaclean
5 years, 3 months ago (2015-09-11 17:26:14 UTC) #23
Message was sent while issue was closed.
On 2015/09/11 17:05:31, mmenke wrote:
> On 2015/07/16 20:11:54, wjmaclean wrote:
> > On 2015/07/15 21:03:58, mmenke wrote:
> > > Sorry, lost context here...
> > > 
> > > So the way I thinking we could do this is make one
URLRequestContextBuilder
> > > for the main URLRequestContext, which owns everything, and another media
> > > one which shares everything but the cache (That cache would have to be
> > > owned by the media context).  Then just make sure we delete the media
> > > contexts first.
> > > 
> > > To make the builder work, you'd need to carefully compare how things are
> > > done for the profile, and how the build works, and add the necessary
> > > options to the builder.  Could refactor the profile code in a couple
phases
> > > to do everything in one spot, so it looks more like the builder, before
> > > switching over, though given the split between incognito and non-incognito
> > > app contexts, that intermediary step may be pretty complicated.
> > > 
> > > An alternative approach would be to switch over incognito first, which
> > > would probably need a lot fewer modifications to the builder, since
nothing
> > > needs to be stored on disk, and then switch over non-incognito (Possibly
> > > sharing code with the incognito patch, just setting a few more things,
like
> > > cache path).
> > > 
> > > On Wed, Jul 15, 2015 at 4:32 PM, Matt Menke <mailto:mmenke@chromium.org>
> > wrote:
> > > 
> > > > On Wed, Jul 15, 2015 at 3:48 PM, <mailto:wjmaclean@chromium.org> wrote:
> > > >
> > > >> On 2015/07/15 19:41:34, mmenke wrote:
> > > >>
> > > >>  What do we get out of making Build in URLRequestContextBuilder
virtual?
> > > >>>
> > > >>
> > > >> I see this as a temporary change, mainly motivated by not wanting to
> > > >> disturb the
> > > >> current Build() function (which seems to have at least one user) until
> > > >> we're
> > > >> ready to roll out the new one. It might not be necessary.
> > > >
> > > >
> > > > There are currently a fair number of consumers of the class, none of
which
> > > > need all the flexibility ProfileIOData currently uses.  The builder was
> > > > created more with their needs in mind, than ProfileIOData's - before,
> > > > everyone was rolling their own code to create a URLRequestContext, and
> > > > their code tended to either get something wrong, and/or wasn't updated
to
> > > > support new features when they were added to URLRequestContext.
> > > >
> > > > One huge difference between current consumers of the Builder and
> > > > ProfileIOData:  The URLRequestBuilder currently takes ownership of all
> > > > URLRequestContext components passed in to it.  ProfileIOData, on the
other
> > > > hand, expects to share stuff between components (A pattern which has,
> > > > admittedly, led to problems, though mostly in other URLRequestContexts
> > > > sharing stuff with ProfileIOData's contexts).  This may be an
> > > > irreconcilable difference between the two sets of expectations.  Adding
an
> > > > option to have it take ownership of something or not, for almost every
> > > > single parameter, seems pretty ugly.
> > > >
> > > >
> > > >>
> > > >>
> > > >>    I really don't want to encourage people to start rolling their own
> > > >>> URLRequestContextBuilder subclasses.
> > > >>>
> > > >>
> > > >> Agreed.
> > > >>
> > > >>  That having been said, I'm fine with adding features to
> > > >>> URLRequestContextBuilder, if we could make it work for ProfileIOData's
> > > >>> needs.
> > > >>>
> > > >>
> > > >>
> > > >> https://codereview.chromium.org/1217563005/
> > > >>
> > > >
> > > >
> > > 
> > > To unsubscribe from this group and stop receiving emails from it, send an
> > email
> > > to mailto:chromium-reviews+unsubscribe@chromium.org.
> > 
> > After reading through the code, I see what you mean about the different
> > ownership issues.
> > 
> > I'll start putting together a proof-of-concept of a builder for the main/otr
> > profiles ... with luck that shouldn't be too awful, but the only way to find
> the
> > pitfalls is to try it ...
> 
> Just FYI:  I'm removing myself as a reviewer from your two older reviews. 
Just
> trimming down my pending review list.

Archived. Useful learning exercise, but not landable in this form ...

Powered by Google App Engine
This is Rietveld 408576698