| 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/content_data_reduction
_proxy_debug_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 data_reduction_proxy_io_data( | 56 data_reduction_proxy_io_data( |
| 53 new data_reduction_proxy::DataReductionProxyIOData( | 57 new data_reduction_proxy::DataReductionProxyIOData( |
| 54 DataReductionProxyChromeSettings::GetClient(), | 58 DataReductionProxyChromeSettings::GetClient(), |
| 55 make_scoped_ptr(data_reduction_proxy_statistics_prefs), | 59 make_scoped_ptr(data_reduction_proxy_statistics_prefs), |
| 56 settings, | 60 settings, |
| 57 net_log, | 61 net_log, |
| 58 io_task_runner, | 62 io_task_runner, |
| 59 ui_task_runner)); | 63 ui_task_runner)); |
| 60 data_reduction_proxy_io_data->InitOnUIThread(prefs); | 64 data_reduction_proxy_io_data->InitOnUIThread(prefs); |
| 61 | 65 |
| 66 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
| 67 scoped_ptr<data_reduction_proxy::ContentDataReductionProxyDebugUIService> |
| 68 data_reduction_proxy_ui_service( |
| 69 new data_reduction_proxy::ContentDataReductionProxyDebugUIService( |
| 70 base::Bind(&data_reduction_proxy::DataReductionProxyConfigurator:: |
| 71 GetProxyConfigOnIOThread, |
| 72 base::Unretained( |
| 73 data_reduction_proxy_io_data->configurator())), |
| 74 ui_task_runner, io_task_runner)); |
| 75 data_reduction_proxy_io_data->set_debug_ui_service( |
| 76 data_reduction_proxy_ui_service.Pass()); |
| 77 #endif |
| 78 |
| 62 return data_reduction_proxy_io_data.Pass(); | 79 return data_reduction_proxy_io_data.Pass(); |
| 63 } | 80 } |
| OLD | NEW |