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

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

Issue 5959008: Remove wstring from l10n_util. Part 2.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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/browser/ssl/ssl_blocking_page.cc ('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) 2010 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_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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/string16.h"
12 #include "net/base/x509_certificate.h" 13 #include "net/base/x509_certificate.h"
13 14
14 class GURL; 15 class GURL;
15 16
16 // This class describes an error that happened while showing a page over SSL. 17 // This class describes an error that happened while showing a page over SSL.
17 // An SSLErrorInfo object only exists on the UI thread and only contains 18 // An SSLErrorInfo object only exists on the UI thread and only contains
18 // information about an error (type of error and text details). 19 // information about an error (type of error and text details).
19 // Note no DISALLOW_COPY_AND_ASSIGN as we want the copy constructor. 20 // Note no DISALLOW_COPY_AND_ASSIGN as we want the copy constructor.
20 class SSLErrorInfo { 21 class SSLErrorInfo {
21 public: 22 public:
(...skipping 22 matching lines...) Expand all
44 45
45 // Populates the specified |errors| vector with the errors contained in 46 // Populates the specified |errors| vector with the errors contained in
46 // |cert_status|. Returns the number of errors found. 47 // |cert_status|. Returns the number of errors found.
47 // Callers only interested in the error count can pass NULL for |errors|. 48 // Callers only interested in the error count can pass NULL for |errors|.
48 static int GetErrorsForCertStatus(int cert_status, 49 static int GetErrorsForCertStatus(int cert_status,
49 int cert_id, 50 int cert_id,
50 const GURL& request_url, 51 const GURL& request_url,
51 std::vector<SSLErrorInfo>* errors); 52 std::vector<SSLErrorInfo>* errors);
52 53
53 // A title describing the error, usually to be used with the details below. 54 // A title describing the error, usually to be used with the details below.
54 const std::wstring& title() const { return title_; } 55 const string16& title() const { return title_; }
55 56
56 // A description of the error. 57 // A description of the error.
57 const std::wstring& details() const { return details_; } 58 const string16& details() const { return details_; }
58 59
59 // A short message describing the error (1 line). 60 // A short message describing the error (1 line).
60 const std::wstring& short_description() const { return short_description_; } 61 const string16& short_description() const { return short_description_; }
61 62
62 // A lengthy explanation of what the error is. Each entry in the returned 63 // A lengthy explanation of what the error is. Each entry in the returned
63 // vector is a paragraph. 64 // vector is a paragraph.
64 const std::vector<std::wstring>& extra_information() const { 65 const std::vector<string16>& extra_information() const {
65 return extra_information_; 66 return extra_information_;
66 } 67 }
67 68
68 private: 69 private:
69 SSLErrorInfo(const std::wstring& title, 70 SSLErrorInfo(const string16& title,
70 const std::wstring& details, 71 const string16& details,
71 const std::wstring& short_description, 72 const string16& short_description,
72 const std::vector<std::wstring>& extra_info); 73 const std::vector<string16>& extra_info);
73 74
74 std::wstring title_; 75 string16 title_;
75 std::wstring details_; 76 string16 details_;
76 std::wstring short_description_; 77 string16 short_description_;
77 // Extra-informations contains paragraphs of text explaining in details what 78 // Extra-informations contains paragraphs of text explaining in details what
78 // the error is and what the risks are. 79 // the error is and what the risks are.
79 std::vector<std::wstring> extra_information_; 80 std::vector<string16> extra_information_;
80 }; 81 };
81 82
82 #endif // CHROME_BROWSER_SSL_SSL_ERROR_INFO_H_ 83 #endif // CHROME_BROWSER_SSL_SSL_ERROR_INFO_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | chrome/browser/ssl/ssl_error_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698