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

Side by Side Diff: chrome/browser/ssl/ssl_add_cert_handler.h

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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_SSL_SSL_ADD_CERT_HANDLER_H_ 5 #ifndef CHROME_BROWSER_SSL_SSL_ADD_CERT_HANDLER_H_
6 #define CHROME_BROWSER_SSL_SSL_ADD_CERT_HANDLER_H_ 6 #define CHROME_BROWSER_SSL_SSL_ADD_CERT_HANDLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 10
11 namespace net { 11 namespace net {
12 class URLRequest; 12 class URLRequest;
13 class X509Certificate; 13 class X509Certificate;
14 } 14 }
15 15
16 // This class handles adding a newly-generated client cert. It ensures there's a 16 // This class handles adding a newly-generated client cert. It ensures there's a
17 // private key for the cert, displays the cert to the user, and adds it upon 17 // private key for the cert, displays the cert to the user, and adds it upon
18 // user approval. 18 // user approval.
19 // It is self-owned and deletes itself when finished. 19 // It is self-owned and deletes itself when finished.
20 class SSLAddCertHandler : public base::RefCountedThreadSafe<SSLAddCertHandler> { 20 class SSLAddCertHandler : public base::RefCountedThreadSafe<SSLAddCertHandler> {
21 public: 21 public:
22 SSLAddCertHandler(net::URLRequest* request, net::X509Certificate* cert, 22 SSLAddCertHandler(net::URLRequest* request, net::X509Certificate* cert,
23 int render_process_host_id, int render_view_id); 23 int render_process_host_id, int render_view_id);
24 24
25 net::X509Certificate* cert() { return cert_; } 25 net::X509Certificate* cert() { return cert_.get(); }
26 26
27 int network_request_id() const { return network_request_id_; } 27 int network_request_id() const { return network_request_id_; }
28 28
29 // The platform-specific code calls this when it's done, to clean up. 29 // The platform-specific code calls this when it's done, to clean up.
30 // If |addCert| is true, the cert will be added to the CertDatabase. 30 // If |addCert| is true, the cert will be added to the CertDatabase.
31 void Finished(bool add_cert); 31 void Finished(bool add_cert);
32 32
33 private: 33 private:
34 friend class base::RefCountedThreadSafe<SSLAddCertHandler>; 34 friend class base::RefCountedThreadSafe<SSLAddCertHandler>;
35 virtual ~SSLAddCertHandler(); 35 virtual ~SSLAddCertHandler();
(...skipping 16 matching lines...) Expand all
52 int network_request_id_; 52 int network_request_id_;
53 // The id of the |RenderProcessHost| which started the download. 53 // The id of the |RenderProcessHost| which started the download.
54 int render_process_host_id_; 54 int render_process_host_id_;
55 // The id of the |RenderView| which started the download. 55 // The id of the |RenderView| which started the download.
56 int render_view_id_; 56 int render_view_id_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(SSLAddCertHandler); 58 DISALLOW_COPY_AND_ASSIGN(SSLAddCertHandler);
59 }; 59 };
60 60
61 #endif // CHROME_BROWSER_SSL_SSL_ADD_CERT_HANDLER_H_ 61 #endif // CHROME_BROWSER_SSL_SSL_ADD_CERT_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/speech/chrome_speech_recognition_preferences.cc ('k') | chrome/browser/ssl/ssl_add_cert_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698