Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 1862193002: Enable QUIC for proxies only when QUIC is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sclittle comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 io_data_->app_cache_max_size_ = cache_max_size; 171 io_data_->app_cache_max_size_ = cache_max_size;
172 io_data_->app_media_cache_max_size_ = media_cache_max_size; 172 io_data_->app_media_cache_max_size_ = media_cache_max_size;
173 173
174 io_data_->predictor_.reset(predictor); 174 io_data_->predictor_.reset(predictor);
175 io_data_->domain_reliability_monitor_ = std::move(domain_reliability_monitor); 175 io_data_->domain_reliability_monitor_ = std::move(domain_reliability_monitor);
176 176
177 io_data_->InitializeMetricsEnabledStateOnUIThread(); 177 io_data_->InitializeMetricsEnabledStateOnUIThread();
178 if (io_data_->domain_reliability_monitor_) 178 if (io_data_->domain_reliability_monitor_)
179 io_data_->domain_reliability_monitor_->MoveToNetworkThread(); 179 io_data_->domain_reliability_monitor_->MoveToNetworkThread();
180 180
181 // TODO(tbansal): Move this to IO thread once the data reduction proxy
182 // params are unified into a single object.
183 bool enable_quic_for_data_reduction_proxy =
184 IOThread::ShouldEnableQuicForDataReductionProxy();
185
186 io_data_->set_data_reduction_proxy_io_data( 181 io_data_->set_data_reduction_proxy_io_data(
187 CreateDataReductionProxyChromeIOData( 182 CreateDataReductionProxyChromeIOData(
188 g_browser_process->io_thread()->net_log(), profile_->GetPrefs(), 183 g_browser_process->io_thread()->net_log(), profile_->GetPrefs(),
189 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), 184 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
190 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), 185 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)));
191 enable_quic_for_data_reduction_proxy));
192 186
193 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); 187 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool();
194 scoped_refptr<base::SequencedTaskRunner> db_task_runner = 188 scoped_refptr<base::SequencedTaskRunner> db_task_runner =
195 pool->GetSequencedTaskRunnerWithShutdownBehavior( 189 pool->GetSequencedTaskRunnerWithShutdownBehavior(
196 pool->GetSequenceToken(), 190 pool->GetSequenceToken(),
197 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); 191 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
198 std::unique_ptr<data_reduction_proxy::DataStore> store( 192 std::unique_ptr<data_reduction_proxy::DataStore> store(
199 new data_reduction_proxy::DataStoreImpl(profile_path)); 193 new data_reduction_proxy::DataStoreImpl(profile_path));
200 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile_) 194 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile_)
201 ->InitDataReductionProxySettings( 195 ->InitDataReductionProxySettings(
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 const base::Closure& completion) { 782 const base::Closure& completion) {
789 DCHECK_CURRENTLY_ON(BrowserThread::IO); 783 DCHECK_CURRENTLY_ON(BrowserThread::IO);
790 DCHECK(initialized()); 784 DCHECK(initialized());
791 785
792 DCHECK(transport_security_state()); 786 DCHECK(transport_security_state());
793 // Completes synchronously. 787 // Completes synchronously.
794 transport_security_state()->DeleteAllDynamicDataSince(time); 788 transport_security_state()->DeleteAllDynamicDataSince(time);
795 DCHECK(http_server_properties_manager_); 789 DCHECK(http_server_properties_manager_);
796 http_server_properties_manager_->Clear(completion); 790 http_server_properties_manager_->Clear(completion);
797 } 791 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698