| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_settings.h" | 5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 : DataReductionProxySettings(params.Pass()) { | 72 : DataReductionProxySettings(params.Pass()) { |
| 73 } | 73 } |
| 74 | 74 |
| 75 DataReductionProxyChromeSettings::~DataReductionProxyChromeSettings() { | 75 DataReductionProxyChromeSettings::~DataReductionProxyChromeSettings() { |
| 76 } | 76 } |
| 77 | 77 |
| 78 void DataReductionProxyChromeSettings::InitDataReductionProxySettings( | 78 void DataReductionProxyChromeSettings::InitDataReductionProxySettings( |
| 79 data_reduction_proxy::DataReductionProxyIOData* io_data, | 79 data_reduction_proxy::DataReductionProxyIOData* io_data, |
| 80 PrefService* profile_prefs, | 80 PrefService* profile_prefs, |
| 81 PrefService* local_state_prefs, | 81 PrefService* local_state_prefs, |
| 82 net::URLRequestContextGetter* request_context) { | 82 net::URLRequestContextGetter* request_context, |
| 83 bool enable_quic) { |
| 83 SetProxyConfigurator(io_data->configurator()); | 84 SetProxyConfigurator(io_data->configurator()); |
| 84 DataReductionProxySettings::InitDataReductionProxySettings( | 85 DataReductionProxySettings::InitDataReductionProxySettings( |
| 85 profile_prefs, | 86 profile_prefs, |
| 86 io_data->PassStatisticsPrefs(), | 87 io_data->PassStatisticsPrefs(), |
| 87 request_context, | 88 request_context, |
| 88 io_data->net_log(), | 89 io_data->net_log(), |
| 89 io_data->event_store()); | 90 io_data->event_store(), |
| 91 enable_quic); |
| 90 DataReductionProxySettings::SetOnDataReductionEnabledCallback( | 92 DataReductionProxySettings::SetOnDataReductionEnabledCallback( |
| 91 base::Bind(&DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial, | 93 base::Bind(&DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial, |
| 92 base::Unretained(this))); | 94 base::Unretained(this))); |
| 93 SetDataReductionProxyAlternativeEnabled( | 95 SetDataReductionProxyAlternativeEnabled( |
| 94 DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()); | 96 DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()); |
| 95 // TODO(bengr): Remove after M46. See http://crbug.com/445599. | 97 // TODO(bengr): Remove after M46. See http://crbug.com/445599. |
| 96 MigrateDataReductionProxyOffProxyPrefs(profile_prefs); | 98 MigrateDataReductionProxyOffProxyPrefs(profile_prefs); |
| 97 } | 99 } |
| 98 | 100 |
| 99 void DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial( | 101 void DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial( |
| (...skipping 22 matching lines...) Expand all Loading... |
| 122 #elif defined(OS_OPENBSD) | 124 #elif defined(OS_OPENBSD) |
| 123 return Client::CHROME_OPENBSD; | 125 return Client::CHROME_OPENBSD; |
| 124 #elif defined(OS_SOLARIS) | 126 #elif defined(OS_SOLARIS) |
| 125 return Client::CHROME_SOLARIS; | 127 return Client::CHROME_SOLARIS; |
| 126 #elif defined(OS_QNX) | 128 #elif defined(OS_QNX) |
| 127 return Client::CHROME_QNX; | 129 return Client::CHROME_QNX; |
| 128 #else | 130 #else |
| 129 return Client::UNKNOWN; | 131 return Client::UNKNOWN; |
| 130 #endif | 132 #endif |
| 131 } | 133 } |
| OLD | NEW |