OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_MANAGER_H_ |
6 #define CHROME_BROWSER_SSL_SSL_MANAGER_H_ | 6 #define CHROME_BROWSER_SSL_SSL_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // Convenience methods for serializing/deserializing the security info. | 86 // Convenience methods for serializing/deserializing the security info. |
87 static std::string SerializeSecurityInfo(int cert_id, | 87 static std::string SerializeSecurityInfo(int cert_id, |
88 int cert_status, | 88 int cert_status, |
89 int security_bits); | 89 int security_bits); |
90 static bool DeserializeSecurityInfo(const std::string& state, | 90 static bool DeserializeSecurityInfo(const std::string& state, |
91 int* cert_id, | 91 int* cert_id, |
92 int* cert_status, | 92 int* cert_status, |
93 int* security_bits); | 93 int* security_bits); |
94 | 94 |
95 // Sets |short_name| to <organization_name> [<country>] and |ca_name| | 95 // Returns "<organization_name> [<country>]". |
96 // to something like: | 96 static std::wstring GetEVCertName(const net::X509Certificate& cert); |
97 // "Verified by <issuer_organization_name>" | |
98 static bool GetEVCertNames(const net::X509Certificate& cert, | |
99 std::wstring* short_name, | |
100 std::wstring* ca_name); | |
101 | 97 |
102 private: | 98 private: |
103 // SSLMessageInfo contains the information necessary for displaying a message | 99 // SSLMessageInfo contains the information necessary for displaying a message |
104 // in an info-bar. | 100 // in an info-bar. |
105 struct SSLMessageInfo { | 101 struct SSLMessageInfo { |
106 public: | 102 public: |
107 explicit SSLMessageInfo(const std::wstring& text) | 103 explicit SSLMessageInfo(const std::wstring& text) |
108 : message(text), | 104 : message(text), |
109 action(NULL) { } | 105 action(NULL) { } |
110 | 106 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // for the security UI of this tab. | 146 // for the security UI of this tab. |
151 NavigationController* controller_; | 147 NavigationController* controller_; |
152 | 148 |
153 // Handles registering notifications with the NotificationService. | 149 // Handles registering notifications with the NotificationService. |
154 NotificationRegistrar registrar_; | 150 NotificationRegistrar registrar_; |
155 | 151 |
156 DISALLOW_COPY_AND_ASSIGN(SSLManager); | 152 DISALLOW_COPY_AND_ASSIGN(SSLManager); |
157 }; | 153 }; |
158 | 154 |
159 #endif // CHROME_BROWSER_SSL_SSL_MANAGER_H_ | 155 #endif // CHROME_BROWSER_SSL_SSL_MANAGER_H_ |
OLD | NEW |