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

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

Issue 2581903002: Add SSL error assistant component to dynamically update captive portal list (Closed)
Patch Set: nparker comments Created 3 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
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/ssl/ssl_error_handler.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ERROR_HANDLER_H_ 5 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_
6 #define CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ 6 #define CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 static void HandleSSLError( 103 static void HandleSSLError(
104 content::WebContents* web_contents, 104 content::WebContents* web_contents,
105 int cert_error, 105 int cert_error,
106 const net::SSLInfo& ssl_info, 106 const net::SSLInfo& ssl_info,
107 const GURL& request_url, 107 const GURL& request_url,
108 int options_mask, 108 int options_mask,
109 std::unique_ptr<SSLCertReporter> ssl_cert_reporter, 109 std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
110 const base::Callback<void(content::CertificateRequestResultType)>& 110 const base::Callback<void(content::CertificateRequestResultType)>&
111 callback); 111 callback);
112 112
113 // Sets the binary proto for SSL error assistant. The binary proto
114 // can be downloaded by the component updater, or set by tests.
115 static void SetErrorAssistantProto(
116 std::unique_ptr<chrome_browser_ssl::SSLErrorAssistantConfig>
117 config_proto);
118
113 // Testing methods. 119 // Testing methods.
114 static void ResetConfigForTesting(); 120 static void ResetConfigForTesting();
115 static void SetInterstitialDelayForTesting(const base::TimeDelta& delay); 121 static void SetInterstitialDelayForTesting(const base::TimeDelta& delay);
116 // The callback pointer must remain valid for the duration of error handling. 122 // The callback pointer must remain valid for the duration of error handling.
117 static void SetInterstitialTimerStartedCallbackForTesting( 123 static void SetInterstitialTimerStartedCallbackForTesting(
118 TimerStartedCallback* callback); 124 TimerStartedCallback* callback);
119 static void SetClockForTesting(base::Clock* testing_clock); 125 static void SetClockForTesting(base::Clock* testing_clock);
120 static void SetNetworkTimeTrackerForTesting( 126 static void SetNetworkTimeTrackerForTesting(
121 network_time::NetworkTimeTracker* tracker); 127 network_time::NetworkTimeTracker* tracker);
122 static void SetErrorAssistantProtoForTesting(
123 const chrome_browser_ssl::SSLErrorAssistantConfig& config_proto);
124 static std::string GetHistogramNameForTesting(); 128 static std::string GetHistogramNameForTesting();
125 static void SetErrorAssistantConfig( 129 static void SetErrorAssistantConfig(
126 std::unique_ptr<chrome_browser_ssl::SSLErrorAssistantConfig> 130 std::unique_ptr<chrome_browser_ssl::SSLErrorAssistantConfig>
127 config_proto); 131 config_proto);
128 bool IsTimerRunningForTesting() const; 132 bool IsTimerRunningForTesting() const;
129 133
130 protected: 134 protected:
131 SSLErrorHandler( 135 SSLErrorHandler(
132 std::unique_ptr<Delegate> delegate, 136 std::unique_ptr<Delegate> delegate,
133 content::WebContents* web_contents, 137 content::WebContents* web_contents,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 base::OneShotTimer timer_; 193 base::OneShotTimer timer_;
190 194
191 std::unique_ptr<CommonNameMismatchHandler> common_name_mismatch_handler_; 195 std::unique_ptr<CommonNameMismatchHandler> common_name_mismatch_handler_;
192 196
193 base::WeakPtrFactory<SSLErrorHandler> weak_ptr_factory_; 197 base::WeakPtrFactory<SSLErrorHandler> weak_ptr_factory_;
194 198
195 DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); 199 DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler);
196 }; 200 };
197 201
198 #endif // CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ 202 #endif // CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/ssl/ssl_error_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698