OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_COMMON_STRING_UTIL_H_ |
| 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_COMMON_STRING_UTIL_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/time/time.h" |
| 10 #include "base/values.h" |
| 11 #include "net/ssl/ssl_info.h" |
| 12 #include "url/gurl.h" |
| 13 |
| 14 namespace security_interstitials { |
| 15 |
| 16 // This namespace contains shared functionality for manipulating the strings |
| 17 // and string resources in security error pages. |
| 18 namespace common_string_util { |
| 19 |
| 20 // Returns the |gurl| as a URL appropriate for display in an error page. |
| 21 base::string16 GetFormattedHostName(const GURL& gurl, |
| 22 const std::string& languages); |
| 23 |
| 24 // For SSL-related errors that share a basic structure. |
| 25 void PopulateSSLLayoutStrings(int cert_error, |
| 26 base::DictionaryValue* load_time_data); |
| 27 |
| 28 // For SSL-related errors that provide debugging information. |
| 29 void PopulateSSLDebuggingStrings(const net::SSLInfo ssl_info, |
| 30 const base::Time time_triggered, |
| 31 base::DictionaryValue* load_time_data); |
| 32 |
| 33 } // common_string_util |
| 34 |
| 35 } // namespace security_interstitials |
| 36 |
| 37 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_COMMON_STRING_UTIL_H_ |
OLD | NEW |