| 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 "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 7 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 8 #include "chrome/common/chrome_content_client.h" |
| 8 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" | 9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" |
| 9 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" | 10 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" |
| 10 | 11 |
| 11 #if defined(OS_ANDROID) | 12 #if defined(OS_ANDROID) |
| 12 #include "base/android/build_info.h" | 13 #include "base/android/build_info.h" |
| 13 #endif | 14 #endif |
| 14 | 15 |
| 15 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) | 16 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 16 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 17 #include "components/data_reduction_proxy/content/browser/content_data_reduction
_proxy_debug_ui_service.h" | 18 #include "components/data_reduction_proxy/content/browser/content_data_reduction
_proxy_debug_ui_service.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 45 if (DataReductionProxyParams::IsIncludedInAndroidOnePromoFieldTrial( | 46 if (DataReductionProxyParams::IsIncludedInAndroidOnePromoFieldTrial( |
| 46 base::android::BuildInfo::GetInstance()->android_build_fp())) { | 47 base::android::BuildInfo::GetInstance()->android_build_fp())) { |
| 47 flags |= DataReductionProxyParams::kPromoAllowed; | 48 flags |= DataReductionProxyParams::kPromoAllowed; |
| 48 } | 49 } |
| 49 #endif | 50 #endif |
| 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(), flags, net_log, | 55 DataReductionProxyChromeSettings::GetClient(), flags, net_log, |
| 55 io_task_runner, ui_task_runner, enable_quic)); | 56 io_task_runner, ui_task_runner, enable_quic, GetUserAgent())); |
| 56 data_reduction_proxy_io_data->InitOnUIThread(prefs); | 57 data_reduction_proxy_io_data->InitOnUIThread(prefs); |
| 57 | 58 |
| 58 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) | 59 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 59 scoped_ptr<data_reduction_proxy::ContentDataReductionProxyDebugUIService> | 60 scoped_ptr<data_reduction_proxy::ContentDataReductionProxyDebugUIService> |
| 60 data_reduction_proxy_ui_service( | 61 data_reduction_proxy_ui_service( |
| 61 new data_reduction_proxy::ContentDataReductionProxyDebugUIService( | 62 new data_reduction_proxy::ContentDataReductionProxyDebugUIService( |
| 62 base::Bind(&data_reduction_proxy::DataReductionProxyConfigurator:: | 63 base::Bind(&data_reduction_proxy::DataReductionProxyConfigurator:: |
| 63 GetProxyConfig, | 64 GetProxyConfig, |
| 64 base::Unretained( | 65 base::Unretained( |
| 65 data_reduction_proxy_io_data->configurator())), | 66 data_reduction_proxy_io_data->configurator())), |
| 66 ui_task_runner, io_task_runner, | 67 ui_task_runner, io_task_runner, |
| 67 g_browser_process->GetApplicationLocale())); | 68 g_browser_process->GetApplicationLocale())); |
| 68 data_reduction_proxy_io_data->set_debug_ui_service( | 69 data_reduction_proxy_io_data->set_debug_ui_service( |
| 69 data_reduction_proxy_ui_service.Pass()); | 70 data_reduction_proxy_ui_service.Pass()); |
| 70 #endif | 71 #endif |
| 71 | 72 |
| 72 return data_reduction_proxy_io_data.Pass(); | 73 return data_reduction_proxy_io_data.Pass(); |
| 73 } | 74 } |
| OLD | NEW |