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" |
11 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 11 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
12 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
igurator.h" | 12 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
igurator.h" |
13 #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" |
14 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat
istics_prefs.h" | 14 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat
istics_prefs.h" |
15 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_store.h" | 15 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_store.h" |
16 | 16 |
| 17 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 18 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_d
ebug_ui_service.h" |
| 19 #endif |
| 20 |
17 namespace content { | 21 namespace content { |
18 class BrowserContext; | 22 class BrowserContext; |
19 } | 23 } |
20 | 24 |
21 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> | 25 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> |
22 CreateDataReductionProxyChromeIOData( | 26 CreateDataReductionProxyChromeIOData( |
23 net::NetLog* net_log, | 27 net::NetLog* net_log, |
24 content::BrowserContext* browser_context, | 28 content::BrowserContext* browser_context, |
25 PrefService* prefs, | 29 PrefService* prefs, |
26 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, | 30 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, |
(...skipping 25 matching lines...) Expand all Loading... |
52 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> | 56 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> |
53 data_reduction_proxy_io_data( | 57 data_reduction_proxy_io_data( |
54 new data_reduction_proxy::DataReductionProxyIOData( | 58 new data_reduction_proxy::DataReductionProxyIOData( |
55 DataReductionProxyChromeSettings::GetClient(), | 59 DataReductionProxyChromeSettings::GetClient(), |
56 make_scoped_ptr(data_reduction_proxy_statistics_prefs), | 60 make_scoped_ptr(data_reduction_proxy_statistics_prefs), |
57 settings, | 61 settings, |
58 net_log, | 62 net_log, |
59 io_task_runner, | 63 io_task_runner, |
60 ui_task_runner)); | 64 ui_task_runner)); |
61 data_reduction_proxy_io_data->InitOnUIThread(prefs); | 65 data_reduction_proxy_io_data->InitOnUIThread(prefs); |
| 66 |
| 67 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 68 scoped_ptr<data_reduction_proxy::DataReductionProxyDebugUIService> |
| 69 data_reduction_proxy_ui_service( |
| 70 new data_reduction_proxy::DataReductionProxyDebugUIService( |
| 71 base::Bind(&data_reduction_proxy::DataReductionProxyConfigurator:: |
| 72 GetProxyConfigOnIOThread, |
| 73 base::Unretained( |
| 74 data_reduction_proxy_io_data->configurator())), |
| 75 ui_task_runner, io_task_runner)); |
| 76 data_reduction_proxy_io_data->set_debug_ui_service( |
| 77 data_reduction_proxy_ui_service.Pass()); |
| 78 #endif |
| 79 |
62 settings->SetDataReductionProxyStatisticsPrefs( | 80 settings->SetDataReductionProxyStatisticsPrefs( |
63 data_reduction_proxy_statistics_prefs); | 81 data_reduction_proxy_statistics_prefs); |
64 | 82 |
65 return data_reduction_proxy_io_data.Pass(); | 83 return data_reduction_proxy_io_data.Pass(); |
66 } | 84 } |
OLD | NEW |