Chromium Code Reviews| Index: chrome/browser/profiles/profile_impl.cc |
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
| index 9c4752f9e99322b3d7c62c50f15fe83525a7a52e..9136fdabfff5afbd247e8d0592f4fdb73a203d6d 100644 |
| --- a/chrome/browser/profiles/profile_impl.cc |
| +++ b/chrome/browser/profiles/profile_impl.cc |
| @@ -44,6 +44,7 @@ |
| #include "chrome/browser/download/chrome_download_manager_delegate.h" |
| #include "chrome/browser/download/download_service.h" |
| #include "chrome/browser/download/download_service_factory.h" |
| +#include "chrome/browser/net/net_pref_observer.h" |
| #include "chrome/browser/net/predictor.h" |
| #include "chrome/browser/net/proxy_service_factory.h" |
| #include "chrome/browser/permissions/permission_manager.h" |
| @@ -115,6 +116,7 @@ |
| #include "content/public/common/content_constants.h" |
| #include "content/public/common/page_zoom.h" |
| #include "extensions/features/features.h" |
| +#include "net/http/http_network_session.h" |
| #include "ppapi/features/features.h" |
| #include "printing/features/features.h" |
| #include "ui/base/l10n/l10n_util.h" |
| @@ -622,6 +624,12 @@ void ProfileImpl::DoFinalInit() { |
| session_cookie_mode, GetSpecialStoragePolicy(), |
| CreateDomainReliabilityMonitor(local_state)); |
| + DCHECK(!net_pref_observer_); |
| + NetPrefObserver::UpdateNetParamsCallback update_net_params_callback = |
| + base::Bind(&ProfileImpl::UpdateNetParams, base::Unretained(this)); |
| + net_pref_observer_ = base::MakeUnique<NetPrefObserver>( |
| + prefs_.get(), update_net_params_callback); |
| + |
| #if BUILDFLAG(ENABLE_PLUGINS) |
| ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( |
| this, io_data_.GetResourceContextNoInit()); |
| @@ -1282,3 +1290,8 @@ ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
| return service->CreateMonitor( |
| BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
| } |
| + |
| +void ProfileImpl::UpdateNetParams( |
| + NetPrefObserver::NetParamsChange net_params_change) { |
| + io_data_.UpdateNetParams(net_params_change); |
|
mmenke
2017/01/03 18:49:40
BUG: There are potentially multiple profiles. IO
pmarko
2017/01/03 19:30:49
As far as I can see, this is not actually global -
mmenke
2017/01/03 19:35:42
Oops, sorry, was thinking this was IOData...Where
|
| +} |