OLD | NEW |
---|---|
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 #ifndef CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_ |
6 #define CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
11 #include "base/memory/linked_ptr.h" | 11 #include "base/memory/linked_ptr.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "content/public/browser/web_contents_observer.h" | |
13 #include "content/public/browser/web_contents_user_data.h" | 14 #include "content/public/browser/web_contents_user_data.h" |
14 | 15 |
15 class SSLAddCertHandler; | 16 class SSLAddCertHandler; |
16 | 17 |
17 namespace net { | 18 namespace net { |
18 class HttpNetworkSession; | 19 class HttpNetworkSession; |
19 class SSLCertRequestInfo; | 20 class SSLCertRequestInfo; |
20 class X509Certificate; | 21 class X509Certificate; |
21 } | 22 } |
22 | 23 |
23 class SSLTabHelper : public content::WebContentsUserData<SSLTabHelper> { | 24 class SSLTabHelper : public content::WebContentsObserver, |
25 public content::WebContentsUserData<SSLTabHelper> { | |
jam
2013/02/07 17:56:24
nit: should line up with public on previous line.
Paweł Hajdan Jr.
2013/02/08 09:12:22
Done.
| |
24 public: | 26 public: |
25 virtual ~SSLTabHelper(); | 27 virtual ~SSLTabHelper(); |
26 | 28 |
29 // content::WebContentsObserver: | |
30 virtual void DidChangeVisibleSSLState() OVERRIDE; | |
31 | |
27 // Called when |handler| encounters an error in verifying a received client | 32 // Called when |handler| encounters an error in verifying a received client |
28 // certificate. Note that, because CAs often will not send us intermediate | 33 // certificate. Note that, because CAs often will not send us intermediate |
29 // certificates, the verification we can do is minimal: we verify the | 34 // certificates, the verification we can do is minimal: we verify the |
30 // certificate is parseable, that we have the corresponding private key, and | 35 // certificate is parseable, that we have the corresponding private key, and |
31 // that the certificate has not expired. | 36 // that the certificate has not expired. |
32 void OnVerifyClientCertificateError( | 37 void OnVerifyClientCertificateError( |
33 scoped_refptr<SSLAddCertHandler> handler, int error_code); | 38 scoped_refptr<SSLAddCertHandler> handler, int error_code); |
34 | 39 |
35 // Called when |handler| requests the user's confirmation in adding a client | 40 // Called when |handler| requests the user's confirmation in adding a client |
36 // certificate. | 41 // certificate. |
(...skipping 28 matching lines...) Expand all Loading... | |
65 | 70 |
66 class SSLAddCertData; | 71 class SSLAddCertData; |
67 std::map<int, linked_ptr<SSLAddCertData> > request_id_to_add_cert_data_; | 72 std::map<int, linked_ptr<SSLAddCertData> > request_id_to_add_cert_data_; |
68 | 73 |
69 SSLAddCertData* GetAddCertData(SSLAddCertHandler* handler); | 74 SSLAddCertData* GetAddCertData(SSLAddCertHandler* handler); |
70 | 75 |
71 DISALLOW_COPY_AND_ASSIGN(SSLTabHelper); | 76 DISALLOW_COPY_AND_ASSIGN(SSLTabHelper); |
72 }; | 77 }; |
73 | 78 |
74 #endif // CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_ | 79 #endif // CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_ |
OLD | NEW |