| 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 "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" | 5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 10 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // Android and iOS in order for non-zero delays to be supported. | 39 // Android and iOS in order for non-zero delays to be supported. |
| 40 // (http://crbug.com/408264) | 40 // (http://crbug.com/408264) |
| 41 base::TimeDelta commit_delay = base::TimeDelta(); | 41 base::TimeDelta commit_delay = base::TimeDelta(); |
| 42 #else | 42 #else |
| 43 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); | 43 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 data_reduction_proxy::DataReductionProxyStatisticsPrefs* | 46 data_reduction_proxy::DataReductionProxyStatisticsPrefs* |
| 47 data_reduction_proxy_statistics_prefs = | 47 data_reduction_proxy_statistics_prefs = |
| 48 new data_reduction_proxy::DataReductionProxyStatisticsPrefs( | 48 new data_reduction_proxy::DataReductionProxyStatisticsPrefs( |
| 49 prefs, ui_task_runner, commit_delay); | 49 prefs, ui_task_runner, |
| 50 commit_delay); |
| 50 | 51 |
| 51 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> | 52 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> |
| 52 data_reduction_proxy_io_data( | 53 data_reduction_proxy_io_data( |
| 53 new data_reduction_proxy::DataReductionProxyIOData( | 54 new data_reduction_proxy::DataReductionProxyIOData( |
| 54 DataReductionProxyChromeSettings::GetClient(), | 55 DataReductionProxyChromeSettings::GetClient(), |
| 55 make_scoped_ptr(data_reduction_proxy_statistics_prefs), | 56 make_scoped_ptr(data_reduction_proxy_statistics_prefs), |
| 56 settings, | 57 settings, |
| 57 net_log, | 58 net_log, |
| 58 io_task_runner, | 59 io_task_runner, |
| 59 ui_task_runner)); | 60 ui_task_runner)); |
| 60 data_reduction_proxy_io_data->InitOnUIThread(prefs); | 61 data_reduction_proxy_io_data->InitOnUIThread(prefs); |
| 62 settings->SetDataReductionProxyStatisticsPrefs( |
| 63 data_reduction_proxy_statistics_prefs); |
| 61 | 64 |
| 62 return data_reduction_proxy_io_data.Pass(); | 65 return data_reduction_proxy_io_data.Pass(); |
| 63 } | 66 } |
| OLD | NEW |