Chromium Code Reviews
DescriptionCrNet: add pauseable NSURLProtocol and switch to using it
On iOS 8 with NSURLProtocol, CFNetwork appears to treat |-startLoading| as
meaning "start or resume" and |-stopLoading| as "pause", and may deliver many
such notifications over the lifetime of a request. The old
CRNHTTPProtocolHandler is not designed for this behavior, so this change adds
a separate NSURLProtocol implementation that can defer sending callbacks until
the request is "resumed".
This change should not affect the behavior of Chromium on iOS in any way, since
Chromium will continue using the old NSURLProtocol implementation with the old
behavior. The new NSURLProtocol ought to be safe to use in the same situations,
but demonstrating this conclusively is difficult.
Also, replace crnet_consumer with a non-graphical app with its own NSURLSession
delegate to make testing behavior easier.
BUG=
Committed: https://crrev.com/7d0f7a2bc58307ec844f5d82c03a333117d74f2b
Cr-Commit-Position: refs/heads/master@{#334168}
Patch Set 1 #
Total comments: 8
Patch Set 2 : Fold PauseableProxy into Proxy #
Total comments: 12
Patch Set 3 : Major refactor #Patch Set 4 : Fixes #
Total comments: 21
Patch Set 5 : Documentation and refactors #
Total comments: 14
Patch Set 6 : doc fixes #Patch Set 7 : main.m -> main.mm & format #
Messages
Total messages: 21 (3 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||