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

Unified Diff: components/security_interstitials/core/common_string_util.h

Issue 1481213003: Componentize the bad clock blocking page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Temporary trybot truce gives town the time to fortify defenses Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: components/security_interstitials/core/common_string_util.h
diff --git a/components/security_interstitials/core/common_string_util.h b/components/security_interstitials/core/common_string_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..6f094f3595977d9c829e3e17c253b4450c06bdc7
--- /dev/null
+++ b/components/security_interstitials/core/common_string_util.h
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_COMMON_STRING_UTIL_H_
+#define COMPONENTS_SECURITY_INTERSTITIALS_CORE_COMMON_STRING_UTIL_H_
+
+#include "base/macros.h"
+#include "base/time/time.h"
+#include "base/values.h"
+#include "net/ssl/ssl_info.h"
+#include "url/gurl.h"
+
+namespace security_interstitials {
+
+// This namespace contains shared functionality for manipulating the strings
+// and string resources in security error pages.
+namespace common_string_util {
+
+// Returns the |gurl| as a URL appropriate for display in an error page.
+base::string16 GetFormattedHostName(const GURL& gurl,
+ const std::string& languages);
+
+// For SSL-related errors that share a basic structure.
+void PopulateSSLLayoutStrings(int cert_error,
+ base::DictionaryValue* load_time_data);
+
+// For SSL-related errors that provide debugging information.
+void PopulateSSLDebuggingStrings(const net::SSLInfo ssl_info,
+ const base::Time time_triggered,
+ base::DictionaryValue* load_time_data);
+
+} // common_string_util
+
+} // namespace security_interstitials
+
+#endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_COMMON_STRING_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698