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

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

Issue 1481213003: Componentize the bad clock blocking page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change for pkasting Created 5 years 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/bad_clock_ui.h
diff --git a/components/security_interstitials/core/bad_clock_ui.h b/components/security_interstitials/core/bad_clock_ui.h
new file mode 100644
index 0000000000000000000000000000000000000000..2ec5c6323e15c897a8d5a7923f669921bf293721
--- /dev/null
+++ b/components/security_interstitials/core/bad_clock_ui.h
@@ -0,0 +1,48 @@
+// 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_BAD_CLOCK_UI_H_
+#define COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/time/time.h"
+#include "base/values.h"
+#include "components/security_interstitials/core/controller_client.h"
+#include "components/ssl_errors/error_classification.h"
+#include "net/ssl/ssl_info.h"
+#include "url/gurl.h"
+
+namespace security_interstitials {
+
+// Provides UI for SSL errors caused by clock misconfigurations.
+class BadClockUI {
+ public:
+ BadClockUI(const GURL& request_url,
+ int cert_error, // Should correspond to a NET_ERROR
+ const net::SSLInfo& ssl_info,
+ const base::Time& time_triggered, // Time the error was triggered
+ const std::string& languages,
+ ControllerClient* controller_);
+ ~BadClockUI();
+
+ void PopulateStringsForHTML(base::DictionaryValue* load_time_data);
+ void HandleCommand(SecurityInterstitialCommands command);
+
+ private:
+ void PopulateClockStrings(base::DictionaryValue* load_time_data);
+
+ const GURL request_url_;
+ const int cert_error_;
+ const net::SSLInfo ssl_info_;
+ const base::Time time_triggered_;
+ const std::string languages_;
+ ControllerClient* controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(BadClockUI);
+};
+
+} // security_interstitials
+
+#endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_
« no previous file with comments | « components/security_interstitials/core/BUILD.gn ('k') | components/security_interstitials/core/bad_clock_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698