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

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

Issue 165504: Add new certificate error code... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 4 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ssl/ssl_error_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_ERROR_INFO_H__ 5 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_INFO_H_
6 #define CHROME_BROWSER_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
11 #include "net/base/x509_certificate.h" 11 #include "net/base/x509_certificate.h"
12 12
13 class GURL; 13 class GURL;
14 14
15 // This class describes an error that happened while showing a page over SSL. 15 // This class describes an error that happened while showing a page over SSL.
16 // An SSLErrorInfo object only exists on the UI thread and only contains 16 // An SSLErrorInfo object only exists on the UI thread and only contains
17 // information about an error (type of error and text details). 17 // information about an error (type of error and text details).
18 // Note no DISALLOW_EVIL_CONSTRUCTORS as we want the copy constructor. 18 // Note no DISALLOW_EVIL_CONSTRUCTORS as we want the copy constructor.
19 class SSLErrorInfo { 19 class SSLErrorInfo {
20 public: 20 public:
21 enum ErrorType { 21 enum ErrorType {
22 CERT_COMMON_NAME_INVALID = 0, 22 CERT_COMMON_NAME_INVALID = 0,
23 CERT_DATE_INVALID, 23 CERT_DATE_INVALID,
24 CERT_AUTHORITY_INVALID, 24 CERT_AUTHORITY_INVALID,
25 CERT_CONTAINS_ERRORS, 25 CERT_CONTAINS_ERRORS,
26 CERT_NO_REVOCATION_MECHANISM, 26 CERT_NO_REVOCATION_MECHANISM,
27 CERT_UNABLE_TO_CHECK_REVOCATION, 27 CERT_UNABLE_TO_CHECK_REVOCATION,
28 CERT_REVOKED, 28 CERT_REVOKED,
29 CERT_INVALID, 29 CERT_INVALID,
30 CERT_WEAK_SIGNATURE_ALGORITHM,
30 MIXED_CONTENTS, 31 MIXED_CONTENTS,
31 UNSAFE_CONTENTS, 32 UNSAFE_CONTENTS,
32 UNKNOWN 33 UNKNOWN
33 }; 34 };
34 35
35 virtual ~SSLErrorInfo(); 36 virtual ~SSLErrorInfo();
36 37
37 // Converts a network error code to an ErrorType. 38 // Converts a network error code to an ErrorType.
38 static ErrorType NetErrorToErrorType(int net_error); 39 static ErrorType NetErrorToErrorType(int net_error);
39 40
(...skipping 17 matching lines...) Expand all
57 58
58 // A short message describing the error (1 line). 59 // A short message describing the error (1 line).
59 const std::wstring& short_description() const { return short_description_; } 60 const std::wstring& short_description() const { return short_description_; }
60 61
61 // A lengthy explanation of what the error is. Each entry in the returned 62 // A lengthy explanation of what the error is. Each entry in the returned
62 // vector is a paragraph. 63 // vector is a paragraph.
63 const std::vector<std::wstring>& extra_information() const { 64 const std::vector<std::wstring>& extra_information() const {
64 return extra_information_; 65 return extra_information_;
65 } 66 }
66 67
67 private: 68 private:
68 SSLErrorInfo(const std::wstring& title, 69 SSLErrorInfo(const std::wstring& title,
69 const std::wstring& details, 70 const std::wstring& details,
70 const std::wstring& short_description, 71 const std::wstring& short_description,
71 const std::vector<std::wstring>& extra_info); 72 const std::vector<std::wstring>& extra_info);
72 73
73 std::wstring title_; 74 std::wstring title_;
74 std::wstring details_; 75 std::wstring details_;
75 std::wstring short_description_; 76 std::wstring short_description_;
76 // Extra-informations contains paragraphs of text explaining in details what 77 // Extra-informations contains paragraphs of text explaining in details what
77 // the error is and what the risks are. 78 // the error is and what the risks are.
78 std::vector<std::wstring> extra_information_; 79 std::vector<std::wstring> extra_information_;
79 }; 80 };
80 81
81 #endif // CHROME_BROWSER_SSL_ERROR_INFO_H__ 82 #endif // CHROME_BROWSER_SSL_SSL_ERROR_INFO_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ssl/ssl_error_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698