Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: google_apis/gcm/engine/connection_factory_impl.cc

Issue 1684123004: Bypass the DataReductionProxy for all POST requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Rebase issue Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/resolve_proxy_msg_helper.cc ('k') | jingle/glue/proxy_resolving_client_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/connection_factory_impl.cc
diff --git a/google_apis/gcm/engine/connection_factory_impl.cc b/google_apis/gcm/engine/connection_factory_impl.cc
index 43bac40cd4d4a778b588be09f57e2be8849bf48a..de2523526bfc64435241b4166800c1cdbef91774 100644
--- a/google_apis/gcm/engine/connection_factory_impl.cc
+++ b/google_apis/gcm/engine/connection_factory_impl.cc
@@ -1,16 +1,18 @@
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "google_apis/gcm/engine/connection_factory_impl.h"
+#include <string>
+
#include "base/location.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
#include "base/profiler/scoped_tracker.h"
#include "base/thread_task_runner_handle.h"
#include "google_apis/gcm/engine/connection_handler_impl.h"
#include "google_apis/gcm/monitoring/gcm_stats_recorder.h"
#include "google_apis/gcm/protocol/mcs.pb.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
@@ -300,20 +302,21 @@ void ConnectionFactoryImpl::ConnectImpl() {
// TODO(zea): if the network is offline, don't attempt to connect.
// See crbug.com/396687
connecting_ = true;
GURL current_endpoint = GetCurrentEndpoint();
recorder_->RecordConnectionInitiated(current_endpoint.host());
RebuildNetworkSessionAuthCache();
int status = gcm_network_session_->proxy_service()->ResolveProxy(
current_endpoint,
+ std::string(),
net::LOAD_NORMAL,
&proxy_info_,
base::Bind(&ConnectionFactoryImpl::OnProxyResolveDone,
weak_ptr_factory_.GetWeakPtr()),
&pac_request_,
NULL,
bound_net_log_);
if (status != net::ERR_IO_PENDING)
OnProxyResolveDone(status);
}
@@ -523,21 +526,22 @@ int ConnectionFactoryImpl::ReconsiderProxyAfterError(int error) {
}
net::SSLConfig ssl_config;
gcm_network_session_->ssl_config_service()->GetSSLConfig(&ssl_config);
if (proxy_info_.is_https() && ssl_config.send_client_cert) {
gcm_network_session_->ssl_client_auth_cache()->Remove(
proxy_info_.proxy_server().host_port_pair());
}
int status = gcm_network_session_->proxy_service()->ReconsiderProxyAfterError(
- GetCurrentEndpoint(), net::LOAD_NORMAL, error, &proxy_info_,
+ GetCurrentEndpoint(),
+ std::string(), net::LOAD_NORMAL, error, &proxy_info_,
base::Bind(&ConnectionFactoryImpl::OnProxyResolveDone,
weak_ptr_factory_.GetWeakPtr()),
&pac_request_,
NULL,
bound_net_log_);
if (status == net::OK || status == net::ERR_IO_PENDING) {
CloseSocket();
} else {
// If ReconsiderProxyAfterError() failed synchronously, it means
// there was nothing left to fall-back to, so fail the transaction
« no previous file with comments | « content/browser/resolve_proxy_msg_helper.cc ('k') | jingle/glue/proxy_resolving_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698