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

Side by Side Diff: components/security_interstitials/core/bad_clock_ui.h

Issue 1772143002: Use network time for bad clock interstitial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pass "gn check out/Default" Created 4 years, 9 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
« no previous file with comments | « components/BUILD.gn ('k') | components/security_interstitials/core/bad_clock_ui.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 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_BAD_CLOCK_UI_H_ 5 #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_
6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_ 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "components/security_interstitials/core/controller_client.h" 12 #include "components/security_interstitials/core/controller_client.h"
13 #include "components/ssl_errors/error_classification.h" 13 #include "components/ssl_errors/error_classification.h"
14 #include "net/ssl/ssl_info.h" 14 #include "net/ssl/ssl_info.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace security_interstitials { 17 namespace security_interstitials {
18 18
19 // Provides UI for SSL errors caused by clock misconfigurations. 19 // Provides UI for SSL errors caused by clock misconfigurations.
20 class BadClockUI { 20 class BadClockUI {
21 public: 21 public:
22 BadClockUI(const GURL& request_url, 22 BadClockUI(const GURL& request_url,
23 int cert_error, // Should correspond to a NET_ERROR 23 int cert_error, // Should correspond to a NET_ERROR
24 const net::SSLInfo& ssl_info, 24 const net::SSLInfo& ssl_info,
25 const base::Time& time_triggered, // Time the error was triggered 25 const base::Time& time_triggered, // Time the error was triggered
26 ssl_errors::ClockState clock_state,
26 const std::string& languages, 27 const std::string& languages,
27 ControllerClient* controller_); 28 ControllerClient* controller_);
28 ~BadClockUI(); 29 ~BadClockUI();
29 30
30 void PopulateStringsForHTML(base::DictionaryValue* load_time_data); 31 void PopulateStringsForHTML(base::DictionaryValue* load_time_data);
31 void HandleCommand(SecurityInterstitialCommands command); 32 void HandleCommand(SecurityInterstitialCommands command);
32 33
33 private: 34 private:
34 void PopulateClockStrings(base::DictionaryValue* load_time_data); 35 void PopulateClockStrings(base::DictionaryValue* load_time_data);
35 36
36 const GURL request_url_; 37 const GURL request_url_;
37 const int cert_error_; 38 const int cert_error_;
38 const net::SSLInfo ssl_info_; 39 const net::SSLInfo ssl_info_;
39 const base::Time time_triggered_; 40 const base::Time time_triggered_;
40 const std::string languages_; 41 const std::string languages_;
41 ControllerClient* controller_; 42 ControllerClient* controller_;
43 ssl_errors::ClockState clock_state_;
42 44
43 DISALLOW_COPY_AND_ASSIGN(BadClockUI); 45 DISALLOW_COPY_AND_ASSIGN(BadClockUI);
44 }; 46 };
45 47
46 } // security_interstitials 48 } // security_interstitials
47 49
48 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_ 50 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_BAD_CLOCK_UI_H_
OLDNEW
« no previous file with comments | « components/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