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

Side by Side Diff: google_apis/gcm/engine/connection_factory_impl.cc

Issue 298883011: Record errors that trigger a data reduction proxy bypass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | jingle/glue/proxy_resolving_client_socket.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "google_apis/gcm/engine/connection_factory_impl.h" 5 #include "google_apis/gcm/engine/connection_factory_impl.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/metrics/sparse_histogram.h" 9 #include "base/metrics/sparse_histogram.h"
10 #include "google_apis/gcm/engine/connection_handler_impl.h" 10 #include "google_apis/gcm/engine/connection_handler_impl.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 } 450 }
451 451
452 net::SSLConfig ssl_config; 452 net::SSLConfig ssl_config;
453 network_session_->ssl_config_service()->GetSSLConfig(&ssl_config); 453 network_session_->ssl_config_service()->GetSSLConfig(&ssl_config);
454 if (proxy_info_.is_https() && ssl_config.send_client_cert) { 454 if (proxy_info_.is_https() && ssl_config.send_client_cert) {
455 network_session_->ssl_client_auth_cache()->Remove( 455 network_session_->ssl_client_auth_cache()->Remove(
456 proxy_info_.proxy_server().host_port_pair()); 456 proxy_info_.proxy_server().host_port_pair());
457 } 457 }
458 458
459 int status = network_session_->proxy_service()->ReconsiderProxyAfterError( 459 int status = network_session_->proxy_service()->ReconsiderProxyAfterError(
460 GetCurrentEndpoint(), &proxy_info_, 460 GetCurrentEndpoint(), error, &proxy_info_,
461 base::Bind(&ConnectionFactoryImpl::OnProxyResolveDone, 461 base::Bind(&ConnectionFactoryImpl::OnProxyResolveDone,
462 weak_ptr_factory_.GetWeakPtr()), 462 weak_ptr_factory_.GetWeakPtr()),
463 &pac_request_, 463 &pac_request_,
464 bound_net_log_); 464 bound_net_log_);
465 if (status == net::OK || status == net::ERR_IO_PENDING) { 465 if (status == net::OK || status == net::ERR_IO_PENDING) {
466 CloseSocket(); 466 CloseSocket();
467 } else { 467 } else {
468 // If ReconsiderProxyAfterError() failed synchronously, it means 468 // If ReconsiderProxyAfterError() failed synchronously, it means
469 // there was nothing left to fall-back to, so fail the transaction 469 // there was nothing left to fall-back to, so fail the transaction
470 // with the last connection error we got. 470 // with the last connection error we got.
(...skipping 22 matching lines...) Expand all
493 // the destroyed socket. 493 // the destroyed socket.
494 if (connection_handler_) 494 if (connection_handler_)
495 connection_handler_->Reset(); 495 connection_handler_->Reset();
496 496
497 if (socket_handle_.socket() && socket_handle_.socket()->IsConnected()) 497 if (socket_handle_.socket() && socket_handle_.socket()->IsConnected())
498 socket_handle_.socket()->Disconnect(); 498 socket_handle_.socket()->Disconnect();
499 socket_handle_.Reset(); 499 socket_handle_.Reset();
500 } 500 }
501 501
502 } // namespace gcm 502 } // namespace gcm
OLDNEW
« no previous file with comments | « no previous file | jingle/glue/proxy_resolving_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698