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 scoped_ptr<data_reduction_proxy::LoFiDecider>( | |
Lei Zhang
2015/10/17 00:40:38
you can probably use make_scoped_ptr here.
megjablon
2015/10/19 19:44:21
Done.
| |
72 new data_reduction_proxy::ContentLoFiDecider())); | |
73 | |
69 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) | 74 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
70 scoped_ptr<data_reduction_proxy::ContentDataReductionProxyDebugUIService> | 75 scoped_ptr<data_reduction_proxy::ContentDataReductionProxyDebugUIService> |
71 data_reduction_proxy_ui_service( | 76 data_reduction_proxy_ui_service( |
72 new data_reduction_proxy::ContentDataReductionProxyDebugUIService( | 77 new data_reduction_proxy::ContentDataReductionProxyDebugUIService( |
73 base::Bind(&data_reduction_proxy::DataReductionProxyConfigurator:: | 78 base::Bind(&data_reduction_proxy::DataReductionProxyConfigurator:: |
74 GetProxyConfig, | 79 GetProxyConfig, |
75 base::Unretained( | 80 base::Unretained( |
76 data_reduction_proxy_io_data->configurator())), | 81 data_reduction_proxy_io_data->configurator())), |
77 ui_task_runner, io_task_runner, | 82 ui_task_runner, io_task_runner, |
78 g_browser_process->GetApplicationLocale())); | 83 g_browser_process->GetApplicationLocale())); |
79 data_reduction_proxy_io_data->set_debug_ui_service( | 84 data_reduction_proxy_io_data->set_debug_ui_service( |
80 data_reduction_proxy_ui_service.Pass()); | 85 data_reduction_proxy_ui_service.Pass()); |
81 #endif | 86 #endif |
82 | 87 |
83 return data_reduction_proxy_io_data.Pass(); | 88 return data_reduction_proxy_io_data.Pass(); |
84 } | 89 } |
OLD | NEW |