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