| Index: components/data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.cc
|
| diff --git a/components/data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.cc b/components/data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.cc
|
| index ed2cd4d40c8c752c3435888b2449d58120f1eb69..51fe1e95157c41459bb329cb5acc14d611300ac4 100644
|
| --- a/components/data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.cc
|
| +++ b/components/data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.cc
|
| @@ -28,8 +28,8 @@ bool DataReductionProxyMessageFilter::OnMessageReceived(
|
| const IPC::Message& message) {
|
| bool handled = true;
|
| IPC_BEGIN_MESSAGE_MAP(DataReductionProxyMessageFilter, message)
|
| - IPC_MESSAGE_HANDLER(DataReductionProxyViewHostMsg_IsDataReductionProxy,
|
| - OnIsDataReductionProxy)
|
| + IPC_MESSAGE_HANDLER(DataReductionProxyViewHostMsg_DataReductionProxyStatus,
|
| + OnDataReductionProxyStatus)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
| return handled;
|
| @@ -38,17 +38,29 @@ bool DataReductionProxyMessageFilter::OnMessageReceived(
|
| void DataReductionProxyMessageFilter::OverrideThreadForMessage(
|
| const IPC::Message& message, content::BrowserThread::ID* thread) {
|
| if (message.type() ==
|
| - DataReductionProxyViewHostMsg_IsDataReductionProxy::ID) {
|
| + DataReductionProxyViewHostMsg_DataReductionProxyStatus::ID) {
|
| *thread = content::BrowserThread::IO;
|
| }
|
| }
|
|
|
| -void DataReductionProxyMessageFilter::OnIsDataReductionProxy(
|
| - const net::HostPortPair& proxy_server, bool* response) {
|
| - if (config_)
|
| - *response = config_->IsDataReductionProxy(proxy_server, nullptr);
|
| - else
|
| - *response = false;
|
| +void DataReductionProxyMessageFilter::OnDataReductionProxyStatus(
|
| + const net::HostPortPair& proxy_server,
|
| + bool* is_data_reduction_proxy,
|
| + bool* lofi_enabled,
|
| + bool* lofi_control) {
|
| + *is_data_reduction_proxy = false;
|
| + *lofi_enabled = false;
|
| + *lofi_control = false;
|
| + if (!config_) {
|
| + return;
|
| + }
|
| + *is_data_reduction_proxy =
|
| + config_->IsDataReductionProxy(proxy_server, nullptr);
|
| + if (*is_data_reduction_proxy && config_->IsNetworkBad()) {
|
| + *lofi_enabled = config_->IsIncludedInLoFiEnabledFieldTrial();
|
| + *lofi_control = config_->IsIncludedInLoFiControlFieldTrial();
|
| + DCHECK(!(*lofi_enabled && *lofi_control));
|
| + }
|
| }
|
|
|
| } // namespace data_reduction_proxy
|
|
|