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