Chromium Code Reviews| Index: chrome/browser/safe_browsing/safe_browsing_service.cc |
| diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc |
| index eafb8f1b42837b235832259d4c25d2f25cf5c6b1..29fe9e89ef91c466c1ac32b0019ca38991ebbd26 100644 |
| --- a/chrome/browser/safe_browsing/safe_browsing_service.cc |
| +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc |
| @@ -139,6 +139,8 @@ class SafeBrowsingURLRequestContextGetter |
| // true. |
| void ServiceShuttingDown(); |
| + void SetQuicEnabledOnIOThread(bool quic_enabled); |
| + |
| protected: |
| ~SafeBrowsingURLRequestContextGetter() override; |
| @@ -239,6 +241,16 @@ void SafeBrowsingURLRequestContextGetter::ServiceShuttingDown() { |
| safe_browsing_request_context_.reset(); |
| } |
| +void SafeBrowsingURLRequestContextGetter::SetQuicEnabledOnIOThread( |
| + bool quic_enabled) { |
| + DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| + |
| + if (!http_network_session_) |
| + return; |
| + |
| + http_network_session_->SetQuicEnabled(quic_enabled); |
|
Nathan Parker
2017/01/04 20:06:04
It seems like over-coupling to have this class nee
pmarko
2017/01/04 20:18:23
Good point. I didn't want everyone need to #includ
mmenke
2017/01/04 21:36:02
Classes, in general, shouldn't be creating their o
Nathan Parker
2017/01/04 21:54:10
It may be... We do need a separate cookie jar for
mmenke
2017/01/04 21:56:56
Why do we need a separate cookie jar for safebrows
mmenke
2017/01/04 22:02:26
It stores the connections, that is, not the cookie
Nathan Parker
2017/01/04 22:57:38
I wasn't around when this code was written, but fr
|
| +} |
| + |
| SafeBrowsingURLRequestContextGetter::~SafeBrowsingURLRequestContextGetter() {} |
| // static |
| @@ -389,6 +401,17 @@ net::URLRequestContextGetter* SafeBrowsingService::url_request_context() { |
| return url_request_context_getter_.get(); |
| } |
| +void SafeBrowsingService::UpdateNetParams( |
| + NetPrefObserver::NetParamsChange net_params_change) { |
| + DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| + |
| + BrowserThread::PostTask( |
| + BrowserThread::IO, FROM_HERE, |
| + base::Bind(&SafeBrowsingURLRequestContextGetter::SetQuicEnabledOnIOThread, |
| + url_request_context_getter_, |
| + net_params_change.quic_enabled_new)); |
| +} |
| + |
| const scoped_refptr<SafeBrowsingUIManager>& |
| SafeBrowsingService::ui_manager() const { |
| return ui_manager_; |