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

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

Issue 1772143002: Use network time for bad clock interstitial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: estark review 2 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
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_SSL_ERROR_UI_H_ 5 #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_SSL_ERROR_UI_H_
6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_SSL_ERROR_UI_H_ 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_SSL_ERROR_UI_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 "components/security_interstitials/core/controller_client.h" 11 #include "components/security_interstitials/core/controller_client.h"
12 #include "net/ssl/ssl_info.h" 12 #include "net/ssl/ssl_info.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 namespace network_time {
16 class NetworkTimeTracker;
17 }
18
15 namespace security_interstitials { 19 namespace security_interstitials {
16 20
17 class ControllerClient; 21 class ControllerClient;
18 22
19 // This class displays UI for SSL errors that block page loads. This class is 23 // This class displays UI for SSL errors that block page loads. This class is
20 // purely about visual display; it does not do any error-handling logic to 24 // purely about visual display; it does not do any error-handling logic to
21 // determine what type of error should be displayed when. 25 // determine what type of error should be displayed when.
22 class SSLErrorUI { 26 class SSLErrorUI {
23 public: 27 public:
24 enum SSLErrorOptionsMask { 28 enum SSLErrorOptionsMask {
(...skipping 12 matching lines...) Expand all
37 // Indicates that a user decision had been previously made but the 41 // Indicates that a user decision had been previously made but the
38 // decision has expired. 42 // decision has expired.
39 EXPIRED_BUT_PREVIOUSLY_ALLOWED = 1 << 3, 43 EXPIRED_BUT_PREVIOUSLY_ALLOWED = 1 << 3,
40 }; 44 };
41 45
42 SSLErrorUI(const GURL& request_url, 46 SSLErrorUI(const GURL& request_url,
43 int cert_error, 47 int cert_error,
44 const net::SSLInfo& ssl_info, 48 const net::SSLInfo& ssl_info,
45 int display_options, // Bitmask of SSLErrorOptionsMask values. 49 int display_options, // Bitmask of SSLErrorOptionsMask values.
46 const base::Time& time_triggered, 50 const base::Time& time_triggered,
51 const network_time::NetworkTimeTracker* network_time_tracker,
47 const std::string& languages, 52 const std::string& languages,
48 ControllerClient* controller); 53 ControllerClient* controller);
49 ~SSLErrorUI(); 54 ~SSLErrorUI();
50 55
51 void PopulateStringsForHTML(base::DictionaryValue* load_time_data); 56 void PopulateStringsForHTML(base::DictionaryValue* load_time_data);
52 void HandleCommand(SecurityInterstitialCommands command); 57 void HandleCommand(SecurityInterstitialCommands command);
53 58
54 private: 59 private:
55 void PopulateOverridableStrings(base::DictionaryValue* load_time_data); 60 void PopulateOverridableStrings(base::DictionaryValue* load_time_data);
56 void PopulateNonOverridableStrings(base::DictionaryValue* load_time_data); 61 void PopulateNonOverridableStrings(base::DictionaryValue* load_time_data);
(...skipping 11 matching lines...) Expand all
68 73
69 ControllerClient* controller_; 74 ControllerClient* controller_;
70 bool user_made_decision_; // Whether the user made a choice in the UI. 75 bool user_made_decision_; // Whether the user made a choice in the UI.
71 76
72 DISALLOW_COPY_AND_ASSIGN(SSLErrorUI); 77 DISALLOW_COPY_AND_ASSIGN(SSLErrorUI);
73 }; 78 };
74 79
75 } // security_interstitials 80 } // security_interstitials
76 81
77 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_SSL_ERROR_UI_H_ 82 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_SSL_ERROR_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698