| 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/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 8 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 9 #include "chrome/common/chrome_content_client.h" | 9 #include "chrome/common/chrome_content_client.h" |
| 10 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_expe
riments_stats.h" |
| 10 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" | 11 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" |
| 11 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" | 12 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" |
| 12 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_
names.h" | 13 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_
names.h" |
| 13 | 14 |
| 14 #if defined(OS_ANDROID) | 15 #if defined(OS_ANDROID) |
| 15 #include "base/android/build_info.h" | 16 #include "base/android/build_info.h" |
| 16 #endif | 17 #endif |
| 17 | 18 |
| 18 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) | 19 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 19 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 bool enabled = prefs->GetBoolean( | 55 bool enabled = prefs->GetBoolean( |
| 55 data_reduction_proxy::prefs::kDataReductionProxyEnabled) || | 56 data_reduction_proxy::prefs::kDataReductionProxyEnabled) || |
| 56 data_reduction_proxy::DataReductionProxyParams:: | 57 data_reduction_proxy::DataReductionProxyParams:: |
| 57 ShouldForceEnableDataReductionProxy(); | 58 ShouldForceEnableDataReductionProxy(); |
| 58 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> | 59 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> |
| 59 data_reduction_proxy_io_data( | 60 data_reduction_proxy_io_data( |
| 60 new data_reduction_proxy::DataReductionProxyIOData( | 61 new data_reduction_proxy::DataReductionProxyIOData( |
| 61 DataReductionProxyChromeSettings::GetClient(), flags, net_log, | 62 DataReductionProxyChromeSettings::GetClient(), flags, net_log, |
| 62 io_task_runner, ui_task_runner, enabled, enable_quic, | 63 io_task_runner, ui_task_runner, enabled, enable_quic, |
| 63 GetUserAgent())); | 64 GetUserAgent())); |
| 65 data_reduction_proxy_io_data->experiments_stats()->InitializeOnUIThread( |
| 66 data_reduction_proxy::DataReductionProxyExperimentsStats:: |
| 67 ConfigRetrievalParams::Create(prefs)); |
| 64 | 68 |
| 65 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) | 69 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 66 scoped_ptr<data_reduction_proxy::ContentDataReductionProxyDebugUIService> | 70 scoped_ptr<data_reduction_proxy::ContentDataReductionProxyDebugUIService> |
| 67 data_reduction_proxy_ui_service( | 71 data_reduction_proxy_ui_service( |
| 68 new data_reduction_proxy::ContentDataReductionProxyDebugUIService( | 72 new data_reduction_proxy::ContentDataReductionProxyDebugUIService( |
| 69 base::Bind(&data_reduction_proxy::DataReductionProxyConfigurator:: | 73 base::Bind(&data_reduction_proxy::DataReductionProxyConfigurator:: |
| 70 GetProxyConfig, | 74 GetProxyConfig, |
| 71 base::Unretained( | 75 base::Unretained( |
| 72 data_reduction_proxy_io_data->configurator())), | 76 data_reduction_proxy_io_data->configurator())), |
| 73 ui_task_runner, io_task_runner, | 77 ui_task_runner, io_task_runner, |
| 74 g_browser_process->GetApplicationLocale())); | 78 g_browser_process->GetApplicationLocale())); |
| 75 data_reduction_proxy_io_data->set_debug_ui_service( | 79 data_reduction_proxy_io_data->set_debug_ui_service( |
| 76 data_reduction_proxy_ui_service.Pass()); | 80 data_reduction_proxy_ui_service.Pass()); |
| 77 #endif | 81 #endif |
| 78 | 82 |
| 79 return data_reduction_proxy_io_data.Pass(); | 83 return data_reduction_proxy_io_data.Pass(); |
| 80 } | 84 } |
| OLD | NEW |