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

Side by Side Diff: chrome/browser/ssl/ssl_client_auth_observer.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ssl/ssl_client_auth_observer.h" 5 #include "chrome/browser/ssl/ssl_client_auth_observer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 21 matching lines...) Expand all
32 32
33 void SSLClientAuthObserver::CertificateSelected( 33 void SSLClientAuthObserver::CertificateSelected(
34 net::X509Certificate* certificate) { 34 net::X509Certificate* certificate) {
35 if (callback_.is_null()) 35 if (callback_.is_null())
36 return; 36 return;
37 37
38 // Stop listening right away so we don't get our own notification. 38 // Stop listening right away so we don't get our own notification.
39 StopObserving(); 39 StopObserving();
40 40
41 CertDetails details; 41 CertDetails details;
42 details.first = cert_request_info_; 42 details.first = cert_request_info_.get();
43 details.second = certificate; 43 details.second = certificate;
44 content::NotificationService* service = 44 content::NotificationService* service =
45 content::NotificationService::current(); 45 content::NotificationService::current();
46 service->Notify(chrome::NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED, 46 service->Notify(chrome::NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED,
47 content::Source<net::HttpNetworkSession>(network_session_), 47 content::Source<net::HttpNetworkSession>(network_session_),
48 content::Details<CertDetails>(&details)); 48 content::Details<CertDetails>(&details));
49 49
50 callback_.Run(certificate); 50 callback_.Run(certificate);
51 callback_.Reset(); 51 callback_.Reset();
52 } 52 }
(...skipping 22 matching lines...) Expand all
75 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 75 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
76 notification_registrar_.Add( 76 notification_registrar_.Add(
77 this, chrome::NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED, 77 this, chrome::NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED,
78 content::Source<net::HttpNetworkSession>(network_session_)); 78 content::Source<net::HttpNetworkSession>(network_session_));
79 } 79 }
80 80
81 void SSLClientAuthObserver::StopObserving() { 81 void SSLClientAuthObserver::StopObserving() {
82 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 82 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
83 notification_registrar_.RemoveAll(); 83 notification_registrar_.RemoveAll();
84 } 84 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_client_auth_observer.h ('k') | chrome/browser/ssl/ssl_client_certificate_selector_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698