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

Side by Side Diff: content/browser/ssl/ssl_manager.h

Issue 1459473003: Add a WebContents getter callback in ResourceRequestInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Nasko's comment 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 unified diff | Download patch
« no previous file with comments | « content/browser/ssl/ssl_error_handler.cc ('k') | content/browser/ssl/ssl_manager.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 (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 CONTENT_BROWSER_SSL_SSL_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_SSL_SSL_MANAGER_H_
6 #define CONTENT_BROWSER_SSL_SSL_MANAGER_H_ 6 #define CONTENT_BROWSER_SSL_SSL_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Entry point for SSLCertificateErrors. This function begins the process 45 // Entry point for SSLCertificateErrors. This function begins the process
46 // of resolving a certificate error during an SSL connection. SSLManager 46 // of resolving a certificate error during an SSL connection. SSLManager
47 // will adjust the security UI and either call |CancelSSLRequest| or 47 // will adjust the security UI and either call |CancelSSLRequest| or
48 // |ContinueSSLRequest| of |delegate|. 48 // |ContinueSSLRequest| of |delegate|.
49 // 49 //
50 // Called on the IO thread. 50 // Called on the IO thread.
51 static void OnSSLCertificateError( 51 static void OnSSLCertificateError(
52 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate, 52 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate,
53 ResourceType resource_type, 53 ResourceType resource_type,
54 const GURL& url, 54 const GURL& url,
55 const base::Callback<WebContents*(void)>& web_contents_getter,
56 const net::SSLInfo& ssl_info,
57 bool fatal);
58
59 // Same as the above, and only works for subresources. Prefer using
60 // OnSSLCertificateError whenever possible (ie when you have access to the
61 // WebContents).
62 static void OnSSLCertificateSubresourceError(
63 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate,
64 const GURL& url,
55 int render_process_id, 65 int render_process_id,
56 int render_frame_id, 66 int render_frame_id,
57 const net::SSLInfo& ssl_info, 67 const net::SSLInfo& ssl_info,
58 bool fatal); 68 bool fatal);
59 69
60 // Called when SSL state for a host or tab changes. 70 // Called when SSL state for a host or tab changes.
61 static void NotifySSLInternalStateChanged(BrowserContext* context); 71 static void NotifySSLInternalStateChanged(BrowserContext* context);
62 72
63 // Construct an SSLManager for the specified tab. 73 // Construct an SSLManager for the specified tab.
64 // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used. 74 // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // The NavigationController that owns this SSLManager. We are responsible 109 // The NavigationController that owns this SSLManager. We are responsible
100 // for the security UI of this tab. 110 // for the security UI of this tab.
101 NavigationControllerImpl* controller_; 111 NavigationControllerImpl* controller_;
102 112
103 DISALLOW_COPY_AND_ASSIGN(SSLManager); 113 DISALLOW_COPY_AND_ASSIGN(SSLManager);
104 }; 114 };
105 115
106 } // namespace content 116 } // namespace content
107 117
108 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ 118 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/ssl/ssl_error_handler.cc ('k') | content/browser/ssl/ssl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698