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

Side by Side Diff: chrome/browser/ssl/ssl_blocking_page.h

Issue 940543003: added clock interstitial to chrome://interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added clock interstitial to chrome://interstitials Created 5 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ 5 #ifndef CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_
6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ 6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Creates an SSL blocking page. If the blocking page isn't shown, the caller 64 // Creates an SSL blocking page. If the blocking page isn't shown, the caller
65 // is responsible for cleaning up the blocking page, otherwise the 65 // is responsible for cleaning up the blocking page, otherwise the
66 // interstitial takes ownership when shown. |options_mask| must be a bitwise 66 // interstitial takes ownership when shown. |options_mask| must be a bitwise
67 // mask of SSLBlockingPageOptionsMask values. 67 // mask of SSLBlockingPageOptionsMask values.
68 SSLBlockingPage(content::WebContents* web_contents, 68 SSLBlockingPage(content::WebContents* web_contents,
69 int cert_error, 69 int cert_error,
70 const net::SSLInfo& ssl_info, 70 const net::SSLInfo& ssl_info,
71 const GURL& request_url, 71 const GURL& request_url,
72 int options_mask, 72 int options_mask,
73 const base::Callback<void(bool)>& callback); 73 const base::Callback<void(bool)>& callback,
74 const base::Time& time_triggered);
Ryan Sleevi 2015/02/27 00:26:39 We tend to structure it so that callbacks are the
fahl 2015/02/27 21:16:17 Done.
74 75
75 // SecurityInterstitialPage method: 76 // SecurityInterstitialPage method:
76 const void* GetTypeForTesting() const override; 77 const void* GetTypeForTesting() const override;
77 78
78 // Returns true if |options_mask| refers to an overridable SSL error. 79 // Returns true if |options_mask| refers to an overridable SSL error.
79 static bool IsOptionsOverridable(int options_mask); 80 static bool IsOptionsOverridable(int options_mask);
80 81
81 protected: 82 protected:
82 // InterstitialPageDelegate implementation. 83 // InterstitialPageDelegate implementation.
83 void CommandReceived(const std::string& command) override; 84 void CommandReceived(const std::string& command) override;
(...skipping 27 matching lines...) Expand all
111 // - This can be set to "false" dynamically to prevent the behaviour. 112 // - This can be set to "false" dynamically to prevent the behaviour.
112 const bool overridable_; 113 const bool overridable_;
113 bool danger_overridable_; 114 bool danger_overridable_;
114 // Has the site requested strict enforcement of certificate errors? 115 // Has the site requested strict enforcement of certificate errors?
115 const bool strict_enforcement_; 116 const bool strict_enforcement_;
116 // Did the user previously allow a bad certificate but the decision has now 117 // Did the user previously allow a bad certificate but the decision has now
117 // expired? 118 // expired?
118 const bool expired_but_previously_allowed_; 119 const bool expired_but_previously_allowed_;
119 scoped_ptr<SSLErrorClassification> ssl_error_classification_; 120 scoped_ptr<SSLErrorClassification> ssl_error_classification_;
120 scoped_ptr<SecurityInterstitialMetricsHelper> metrics_helper_; 121 scoped_ptr<SecurityInterstitialMetricsHelper> metrics_helper_;
122 // The interstitial is supposed to use this for all time-based calculations
Ryan Sleevi 2015/02/27 00:26:39 As a comment/description, this doesn't really indi
fahl 2015/02/27 21:16:17 Done.
123 const base::Time time_triggered_;
121 124
122 // Which type of interstitial this is. 125 // Which type of interstitial this is.
123 enum SSLInterstitialReason { 126 enum SSLInterstitialReason {
124 SSL_REASON_SSL, 127 SSL_REASON_SSL,
125 SSL_REASON_BAD_CLOCK 128 SSL_REASON_BAD_CLOCK
126 } interstitial_reason_; 129 } interstitial_reason_;
127 130
128 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); 131 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage);
129 }; 132 };
130 133
131 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ 134 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/security_warnings/interstitial_ui.html ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698