OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/profiles/profile_impl_io_data.h" | 5 #include "chrome/browser/profiles/profile_impl_io_data.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 ChromeNetLog* const net_log = g_browser_process->io_thread()->net_log(); | 173 ChromeNetLog* const net_log = g_browser_process->io_thread()->net_log(); |
174 | 174 |
175 io_data_->set_data_reduction_proxy_io_data( | 175 io_data_->set_data_reduction_proxy_io_data( |
176 CreateDataReductionProxyChromeIOData( | 176 CreateDataReductionProxyChromeIOData( |
177 net_log, profile_, profile_->GetPrefs(), | 177 net_log, profile_, profile_->GetPrefs(), |
178 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 178 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
179 BrowserThread::GetMessageLoopProxyForThread( | 179 BrowserThread::GetMessageLoopProxyForThread( |
180 BrowserThread::UI)).Pass()); | 180 BrowserThread::UI)).Pass()); |
181 | 181 |
| 182 // TODO(tbansal): Move this to IO thread once the data reduction proxy |
| 183 // params are unified into a single object. |
| 184 bool enable_quic_for_data_reduction_proxy = |
| 185 IOThread::ShouldEnableQuicForDataReductionProxy(); |
| 186 |
182 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile_)-> | 187 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile_)-> |
183 InitDataReductionProxySettings(io_data_->data_reduction_proxy_io_data(), | 188 InitDataReductionProxySettings(io_data_->data_reduction_proxy_io_data(), |
184 profile_->GetPrefs(), | 189 profile_->GetPrefs(), |
185 g_browser_process->local_state(), | 190 g_browser_process->local_state(), |
186 profile_->GetRequestContext()); | 191 profile_->GetRequestContext(), |
| 192 enable_quic_for_data_reduction_proxy); |
187 } | 193 } |
188 | 194 |
189 content::ResourceContext* | 195 content::ResourceContext* |
190 ProfileImplIOData::Handle::GetResourceContext() const { | 196 ProfileImplIOData::Handle::GetResourceContext() const { |
191 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 197 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
192 LazyInitialize(); | 198 LazyInitialize(); |
193 return GetResourceContextNoInit(); | 199 return GetResourceContextNoInit(); |
194 } | 200 } |
195 | 201 |
196 content::ResourceContext* | 202 content::ResourceContext* |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 const base::Closure& completion) { | 855 const base::Closure& completion) { |
850 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 856 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
851 DCHECK(initialized()); | 857 DCHECK(initialized()); |
852 | 858 |
853 DCHECK(transport_security_state()); | 859 DCHECK(transport_security_state()); |
854 // Completes synchronously. | 860 // Completes synchronously. |
855 transport_security_state()->DeleteAllDynamicDataSince(time); | 861 transport_security_state()->DeleteAllDynamicDataSince(time); |
856 DCHECK(http_server_properties_manager_); | 862 DCHECK(http_server_properties_manager_); |
857 http_server_properties_manager_->Clear(completion); | 863 http_server_properties_manager_->Clear(completion); |
858 } | 864 } |
OLD | NEW |