OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/cronet/android/cronet_data_reduction_proxy.h" | 5 #include "components/cronet/android/cronet_data_reduction_proxy.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/prefs/pref_registry_simple.h" | 9 #include "base/prefs/pref_registry_simple.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 url_request_context_getter_ = | 109 url_request_context_getter_ = |
110 new net::TrivialURLRequestContextGetter( | 110 new net::TrivialURLRequestContextGetter( |
111 context, task_runner_); | 111 context, task_runner_); |
112 scoped_ptr<data_reduction_proxy::DataReductionProxyCompressionStats> | 112 scoped_ptr<data_reduction_proxy::DataReductionProxyCompressionStats> |
113 compression_stats( | 113 compression_stats( |
114 new data_reduction_proxy::DataReductionProxyCompressionStats( | 114 new data_reduction_proxy::DataReductionProxyCompressionStats( |
115 prefs_.get(), task_runner_, base::TimeDelta())); | 115 prefs_.get(), task_runner_, base::TimeDelta())); |
116 scoped_ptr<data_reduction_proxy::DataReductionProxyService> | 116 scoped_ptr<data_reduction_proxy::DataReductionProxyService> |
117 data_reduction_proxy_service( | 117 data_reduction_proxy_service( |
118 new data_reduction_proxy::DataReductionProxyService( | 118 new data_reduction_proxy::DataReductionProxyService( |
119 compression_stats.Pass(), settings_.get(), | 119 compression_stats.Pass(), settings_.get(), prefs_.get(), |
120 url_request_context_getter_.get(), task_runner_)); | 120 url_request_context_getter_.get(), task_runner_)); |
121 io_data_->SetDataReductionProxyService( | 121 io_data_->SetDataReductionProxyService( |
122 data_reduction_proxy_service->GetWeakPtr()); | 122 data_reduction_proxy_service->GetWeakPtr()); |
123 settings_->InitDataReductionProxySettings( | 123 settings_->InitDataReductionProxySettings( |
124 prefs_.get(), io_data_.get(), data_reduction_proxy_service.Pass()); | 124 prefs_.get(), io_data_.get(), data_reduction_proxy_service.Pass()); |
125 settings_->SetDataReductionProxyEnabled(enable); | 125 settings_->SetDataReductionProxyEnabled(enable); |
126 settings_->MaybeActivateDataReductionProxy(true); | 126 settings_->MaybeActivateDataReductionProxy(true); |
127 } | 127 } |
128 | 128 |
129 } // namespace cronet | 129 } // namespace cronet |
OLD | NEW |