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/content/browser/content_lofi_decider.h
" |
10 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
ig_retrieval_params.h" | 11 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
ig_retrieval_params.h" |
11 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_expe
riments_stats.h" | 12 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_expe
riments_stats.h" |
12 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" | 13 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" |
13 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" | 14 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" |
14 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_
names.h" | 15 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_
names.h" |
15 | 16 |
16 #if defined(OS_ANDROID) | 17 #if defined(OS_ANDROID) |
17 #include "base/android/build_info.h" | 18 #include "base/android/build_info.h" |
18 #endif | 19 #endif |
19 | 20 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> | 60 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> |
60 data_reduction_proxy_io_data( | 61 data_reduction_proxy_io_data( |
61 new data_reduction_proxy::DataReductionProxyIOData( | 62 new data_reduction_proxy::DataReductionProxyIOData( |
62 DataReductionProxyChromeSettings::GetClient(), flags, net_log, | 63 DataReductionProxyChromeSettings::GetClient(), flags, net_log, |
63 io_task_runner, ui_task_runner, enabled, enable_quic, | 64 io_task_runner, ui_task_runner, enabled, enable_quic, |
64 GetUserAgent())); | 65 GetUserAgent())); |
65 data_reduction_proxy_io_data->experiments_stats()->InitializeOnUIThread( | 66 data_reduction_proxy_io_data->experiments_stats()->InitializeOnUIThread( |
66 data_reduction_proxy::DataReductionProxyConfigRetrievalParams::Create( | 67 data_reduction_proxy::DataReductionProxyConfigRetrievalParams::Create( |
67 prefs)); | 68 prefs)); |
68 | 69 |
| 70 data_reduction_proxy_io_data->set_lofi_decider( |
| 71 make_scoped_ptr(new data_reduction_proxy::ContentLoFiDecider())); |
| 72 |
69 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) | 73 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
70 scoped_ptr<data_reduction_proxy::ContentDataReductionProxyDebugUIService> | 74 scoped_ptr<data_reduction_proxy::ContentDataReductionProxyDebugUIService> |
71 data_reduction_proxy_ui_service( | 75 data_reduction_proxy_ui_service( |
72 new data_reduction_proxy::ContentDataReductionProxyDebugUIService( | 76 new data_reduction_proxy::ContentDataReductionProxyDebugUIService( |
73 base::Bind(&data_reduction_proxy::DataReductionProxyConfigurator:: | 77 base::Bind(&data_reduction_proxy::DataReductionProxyConfigurator:: |
74 GetProxyConfig, | 78 GetProxyConfig, |
75 base::Unretained( | 79 base::Unretained( |
76 data_reduction_proxy_io_data->configurator())), | 80 data_reduction_proxy_io_data->configurator())), |
77 ui_task_runner, io_task_runner, | 81 ui_task_runner, io_task_runner, |
78 g_browser_process->GetApplicationLocale())); | 82 g_browser_process->GetApplicationLocale())); |
79 data_reduction_proxy_io_data->set_debug_ui_service( | 83 data_reduction_proxy_io_data->set_debug_ui_service( |
80 data_reduction_proxy_ui_service.Pass()); | 84 data_reduction_proxy_ui_service.Pass()); |
81 #endif | 85 #endif |
82 | 86 |
83 return data_reduction_proxy_io_data.Pass(); | 87 return data_reduction_proxy_io_data.Pass(); |
84 } | 88 } |
OLD | NEW |