OLD | NEW |
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_ERROR_INFO_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_INFO_H_ |
6 #define CHROME_BROWSER_SSL_SSL_ERROR_INFO_H_ | 6 #define CHROME_BROWSER_SSL_SSL_ERROR_INFO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 // Populates the specified |errors| vector with the errors contained in | 51 // Populates the specified |errors| vector with the errors contained in |
52 // |cert_status|. Returns the number of errors found. | 52 // |cert_status|. Returns the number of errors found. |
53 // Callers only interested in the error count can pass NULL for |errors|. | 53 // Callers only interested in the error count can pass NULL for |errors|. |
54 // TODO(wtc): Document |cert_id| and |url| arguments. | 54 // TODO(wtc): Document |cert_id| and |url| arguments. |
55 static int GetErrorsForCertStatus(int cert_id, | 55 static int GetErrorsForCertStatus(int cert_id, |
56 net::CertStatus cert_status, | 56 net::CertStatus cert_status, |
57 const GURL& url, | 57 const GURL& url, |
58 std::vector<SSLErrorInfo>* errors); | 58 std::vector<SSLErrorInfo>* errors); |
59 | 59 |
60 // A title describing the error, usually to be used with the details below. | |
61 const base::string16& title() const { return title_; } | |
62 | |
63 // A description of the error. | 60 // A description of the error. |
64 const base::string16& details() const { return details_; } | 61 const base::string16& details() const { return details_; } |
65 | 62 |
66 // A short message describing the error (1 line). | 63 // A short message describing the error (1 line). |
67 const base::string16& short_description() const { return short_description_; } | 64 const base::string16& short_description() const { return short_description_; } |
68 | 65 |
69 // A lengthy explanation of what the error is. Each entry in the returned | 66 private: |
70 // vector is a paragraph. | 67 SSLErrorInfo(const base::string16& details, |
71 const std::vector<base::string16>& extra_information() const { | 68 const base::string16& short_description); |
72 return extra_information_; | |
73 } | |
74 | 69 |
75 private: | |
76 SSLErrorInfo(const base::string16& title, | |
77 const base::string16& details, | |
78 const base::string16& short_description, | |
79 const std::vector<base::string16>& extra_info); | |
80 | |
81 base::string16 title_; | |
82 base::string16 details_; | 70 base::string16 details_; |
83 base::string16 short_description_; | 71 base::string16 short_description_; |
84 // Extra-informations contains paragraphs of text explaining in details what | |
85 // the error is and what the risks are. | |
86 std::vector<base::string16> extra_information_; | |
87 }; | 72 }; |
88 | 73 |
89 #endif // CHROME_BROWSER_SSL_SSL_ERROR_INFO_H_ | 74 #endif // CHROME_BROWSER_SSL_SSL_ERROR_INFO_H_ |
OLD | NEW |