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

Issue 10969017: Create a new URLRequestJobFactory for isolated request contexts. (Closed)

Created:
8 years, 3 months ago by awong
Modified:
8 years, 3 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, James Hawkins
Visibility:
Public.

Description

Create a new URLRequestJobFactory for isolated request contexts. Also includes unittest from tzik@: http://codereview.chromium.org/10956009/ Originally the isolated URLRequestContexts used the same URLRequestJobFactory instance as the "default" request context. This breaks filesystem: because the isolated context would incorrectly dispatch to FileSystemContext of the default URLRequestContext. This CL makes it so the isolated contexts do not share the same URLRequestJobFactory. There is now one URLRequestJobFactory per StoragePartition (the code equiv of one isolated context). Note that each RequestContext and MediaRequestContext pair still share the same URLRequestJobFactory. This is safe because they are in the isolation domain. High level changes are: - Each URLRequestJobFactory needs its own protocol_handler_interceptor which requires threading the parameter through all the URLRequestContext factory mess because this particular object must be created on the UI thread. - GetIsolatedMediaRequestContext no longer looks up the app context out of the profile. Instead GetIsolatedMediaRequestContextGetter() does this. This makes it a little clearer that it is really a thin facade over the related isolated context. - The common code for URLJobFactory creation is pulled up into SetUpJobFactoryDefaults out of both off_the_record and the normal profile_impl. This will avoid future divergence of the setup. - FtpProtocolHandler also moved into SetUpJobFactoryDefaults. Again, this is just to avoid future divergence. - Lots of ownership passing moved to scoped_ptr<> to be more explicit. No functionality change here, but lots of text churn. TBR=finnur BUG=150861 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=157900

Patch Set 1 #

Patch Set 2 : #

Total comments: 10

Patch Set 3 : still need to fix incognito and media contexts. #

Patch Set 4 : Incognito fixed. #

Patch Set 5 : media context now wired up. #

Patch Set 6 : Typo and initialization fix. #

Patch Set 7 : comment fixes. #

Total comments: 8

Patch Set 8 : incognito fix #

Total comments: 5

Patch Set 9 : fix ordering #

Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -188 lines) Patch
M chrome/browser/extensions/extension_fileapi_apitest.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/net/chrome_url_request_context.h View 1 2 3 4 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/net/chrome_url_request_context.cc View 1 2 3 4 5 6 7 4 chunks +34 lines, -18 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.h View 1 2 3 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.cc View 1 2 3 4 5 6 7 8 chunks +46 lines, -55 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.h View 1 2 3 3 chunks +12 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 6 7 11 chunks +70 lines, -63 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 1 2 3 4 5 6 7 9 chunks +25 lines, -9 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 chunks +53 lines, -23 lines 0 comments Download
A + chrome/test/data/extensions/api_test/xhr_persistent_fs/bg.js View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/api_test/xhr_persistent_fs/main.html View 1 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/xhr_persistent_fs/main.js View 1 1 chunk +43 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/xhr_persistent_fs/manifest.json View 1 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/storage_partition_impl_map.cc View 1 2 3 4 5 6 7 2 chunks +20 lines, -10 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
awong
Here's my, as yet untested, attempt at a fix. Let me know what you think ...
8 years, 3 months ago (2012-09-20 16:41:48 UTC) #1
awong
New patchset just absorbs tzik's test https://codereview.chromium.org/10956009 to see if it passes on try bots.
8 years, 3 months ago (2012-09-20 17:04:37 UTC) #2
Charlie Reis
If I understand correctly, the actual fix is calling SetupJobFactory on the app's request context? ...
8 years, 3 months ago (2012-09-20 17:47:03 UTC) #3
awong
PTAL. Comments addressed. However, I unfortunately needed to plumb through a bunch more state to ...
8 years, 3 months ago (2012-09-20 22:10:59 UTC) #4
Charlie Reis
LGTM, with nits. https://codereview.chromium.org/10969017/diff/11019/chrome/browser/net/chrome_url_request_context.cc File chrome/browser/net/chrome_url_request_context.cc (right): https://codereview.chromium.org/10969017/diff/11019/chrome/browser/net/chrome_url_request_context.cc#newcode109 chrome/browser/net/chrome_url_request_context.cc:109: // Takes the |main_context| for the ...
8 years, 3 months ago (2012-09-20 22:57:46 UTC) #5
awong
Fixed nits. Also added a line that I missed causing a DCHECK. bleck. https://codereview.chromium.org/10969017/diff/11019/chrome/browser/net/chrome_url_request_context.cc File ...
8 years, 3 months ago (2012-09-20 23:16:46 UTC) #6
awong
willchan: Any chance you have time to do a rush OWNERS review of this? It's ...
8 years, 3 months ago (2012-09-20 23:17:44 UTC) #7
willchan no longer on Chromium
looking
8 years, 3 months ago (2012-09-20 23:22:45 UTC) #8
willchan no longer on Chromium
https://codereview.chromium.org/10969017/diff/6009/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): https://codereview.chromium.org/10969017/diff/6009/chrome/browser/profiles/profile_io_data.h#newcode394 chrome/browser/profiles/profile_io_data.h:394: mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; Why did this move?
8 years, 3 months ago (2012-09-20 23:48:37 UTC) #9
awong
https://codereview.chromium.org/10969017/diff/6009/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): https://codereview.chromium.org/10969017/diff/6009/chrome/browser/profiles/profile_io_data.h#newcode394 chrome/browser/profiles/profile_io_data.h:394: mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; On 2012/09/20 23:48:37, willchan wrote: > ...
8 years, 3 months ago (2012-09-20 23:49:57 UTC) #10
willchan no longer on Chromium
chrome/browser/profiles & chrome/browser/net LGTM, as it looks correct at least. I know Erik has some ...
8 years, 3 months ago (2012-09-21 00:05:24 UTC) #11
awong
Thanks for the review! Once try jobs go green, I will land. https://codereview.chromium.org/10969017/diff/6009/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc ...
8 years, 3 months ago (2012-09-21 00:09:12 UTC) #12
awong
8 years, 3 months ago (2012-09-21 02:31:05 UTC) #13
grr..forgot about extensions review.  TBR finnur.

Powered by Google App Engine
This is Rietveld 408576698