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

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

Issue 498123003: Remove implicit conversions from scoped_refptr to T* in google_apis/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 | « google_apis/gcm/base/socket_stream.cc ('k') | google_apis/gcm/engine/registration_request.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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 base::MessageLoop::current()->PostTask( 528 base::MessageLoop::current()->PostTask(
529 FROM_HERE, 529 FROM_HERE,
530 base::Bind(&ConnectionFactoryImpl::OnProxyResolveDone, 530 base::Bind(&ConnectionFactoryImpl::OnProxyResolveDone,
531 weak_ptr_factory_.GetWeakPtr(), status)); 531 weak_ptr_factory_.GetWeakPtr(), status));
532 status = net::ERR_IO_PENDING; 532 status = net::ERR_IO_PENDING;
533 } 533 }
534 return status; 534 return status;
535 } 535 }
536 536
537 void ConnectionFactoryImpl::ReportSuccessfulProxyConnection() { 537 void ConnectionFactoryImpl::ReportSuccessfulProxyConnection() {
538 if (gcm_network_session_ && gcm_network_session_->proxy_service()) 538 if (gcm_network_session_.get() && gcm_network_session_->proxy_service())
539 gcm_network_session_->proxy_service()->ReportSuccess(proxy_info_, NULL); 539 gcm_network_session_->proxy_service()->ReportSuccess(proxy_info_, NULL);
540 } 540 }
541 541
542 void ConnectionFactoryImpl::CloseSocket() { 542 void ConnectionFactoryImpl::CloseSocket() {
543 // The connection handler needs to be reset, else it'll attempt to keep using 543 // The connection handler needs to be reset, else it'll attempt to keep using
544 // the destroyed socket. 544 // the destroyed socket.
545 if (connection_handler_) 545 if (connection_handler_)
546 connection_handler_->Reset(); 546 connection_handler_->Reset();
547 547
548 if (socket_handle_.socket() && socket_handle_.socket()->IsConnected()) 548 if (socket_handle_.socket() && socket_handle_.socket()->IsConnected())
549 socket_handle_.socket()->Disconnect(); 549 socket_handle_.socket()->Disconnect();
550 socket_handle_.Reset(); 550 socket_handle_.Reset();
551 } 551 }
552 552
553 void ConnectionFactoryImpl::RebuildNetworkSessionAuthCache() { 553 void ConnectionFactoryImpl::RebuildNetworkSessionAuthCache() {
554 if (!http_network_session_ || !http_network_session_->http_auth_cache()) 554 if (!http_network_session_.get() || !http_network_session_->http_auth_cache())
555 return; 555 return;
556 556
557 gcm_network_session_->http_auth_cache()->UpdateAllFrom( 557 gcm_network_session_->http_auth_cache()->UpdateAllFrom(
558 *http_network_session_->http_auth_cache()); 558 *http_network_session_->http_auth_cache());
559 } 559 }
560 560
561 } // namespace gcm 561 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gcm/base/socket_stream.cc ('k') | google_apis/gcm/engine/registration_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698