New issue
Advanced search Search tips

Issue 686631 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 232040
issue 686632



Sign in to add a comment

Enforce CreateHttpFactory to take a shared session

Project Member Reported by zhongyi@chromium.org, Jan 30 2017

Issue description

std::unique_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory(
    net::HttpNetworkSession* session,
    std::unique_ptr<net::HttpCache::BackendFactory> main_backend) const {
  return base::MakeUnique<net::HttpCache>(
      base::WrapUnique(new DevToolsNetworkTransactionFactory(
          network_controller_handle_.GetController(), session)),
      std::move(main_backend), true /* set_up_quic_server_info */);
}

std::unique_ptr<net::HttpCache> ProfileIOData::CreateHttpFactory(
    net::HttpNetworkSession* shared_session,
    std::unique_ptr<net::HttpCache::BackendFactory> backend) const {
  return base::MakeUnique<net::HttpCache>(
      base::WrapUnique(new DevToolsNetworkTransactionFactory(
          network_controller_handle_.GetController(), shared_session)),
      std::move(backend), true /* set_up_quic_server_info */);
}

CreateMainHttpFactory and CreateHttpFactory currently shares the same API, while CreateHttpFactory should actually take a shared HttpNetworkSession. We need to fix the API to make sure CreateHttpFactory is taking a shared HttpNetworkSession.
 
Blocking: 686632
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 30 2017

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

commit 7bd9ad76d703e4b07c39c305252e14926e3b995e
Author: zhongyi <zhongyi@chromium.org>
Date: Mon Jan 30 22:53:12 2017

Fix the code to use the correct API when creating HttpCache:
CreaetMainHttpCache and CreateHttpCache currently
share the same API, though CreaetMainHttpCache should take
HttpNetworkSession which has never been used for HttpCache creation
and CreateHttpCache should take a shared HttpNetworkSession.

When https://codereview.chromium.org/1814543002 landed, the code
should call CreateMainHttpCache than CreateHttpCache as it's no
longer sharing the HttpNetworkSession with the transaction factory
in main_request_context_storage.

BUG= 686631 

Review-Url: https://codereview.chromium.org/2667633003
Cr-Commit-Position: refs/heads/master@{#447097}

[modify] https://crrev.com/7bd9ad76d703e4b07c39c305252e14926e3b995e/chrome/browser/profiles/off_the_record_profile_io_data.cc
[modify] https://crrev.com/7bd9ad76d703e4b07c39c305252e14926e3b995e/chrome/browser/profiles/profile_impl_io_data.cc

Blockedon: 232040
Blocking: 232040
Blockedon: -232040
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 31 2017

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

commit 1795d4374bb73cf4bf9641a1df1a2f30936f0d5b
Author: zhongyi <zhongyi@chromium.org>
Date: Tue Jan 31 19:54:46 2017

Change ProfileIOData::CreateHttpFactory to take an
HttpTransactionFactory to differentiate from
ProfileIOData:::CreateMainHttpFactory. The HttpTransactionFactory
created will be enforced to share the HttpNetowrkSession with the
factory passed in.

BUG= 686631 

Review-Url: https://codereview.chromium.org/2660983002
Cr-Commit-Position: refs/heads/master@{#447306}

[modify] https://crrev.com/1795d4374bb73cf4bf9641a1df1a2f30936f0d5b/chrome/browser/profiles/profile_impl_io_data.cc
[modify] https://crrev.com/1795d4374bb73cf4bf9641a1df1a2f30936f0d5b/chrome/browser/profiles/profile_io_data.cc
[modify] https://crrev.com/1795d4374bb73cf4bf9641a1df1a2f30936f0d5b/chrome/browser/profiles/profile_io_data.h

Status: Fixed (was: Assigned)

Sign in to add a comment