Add NetworkService support for extensions and downloads (see issue #2622).

To test:
- All tests pass with NetworkService disabled. DownloadTest.*, ExtensionTest.*
  and PluginTest.* tests pass with NetworkService enabled.
- The PDF extension displays a file, and the download and print buttons work.
This commit is contained in:
Marshall Greenblatt
2019-05-01 15:09:59 -04:00
parent 0193a3fe54
commit 5ce52bd775
10 changed files with 181 additions and 37 deletions

View File

@@ -888,8 +888,9 @@ std::unique_ptr<InterceptedRequestHandler> CreateInterceptedRequestHandler(
}
// Flag subresource loads of custom schemes.
const bool is_external = !is_navigation && !scheme::IsInternalHandledScheme(
request_initiator.scheme());
const bool is_external =
!is_navigation && !is_download && !request_initiator.scheme().empty() &&
!scheme::IsInternalHandledScheme(request_initiator.scheme());
wrapper->Initialize(browser_context, browserPtr, framePtr, render_process_id,
render_frame_id, frame_tree_node_id, is_navigation,