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

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

Issue 403933002: Set SSL info when an HTTP auth dialog is triggered by direct navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nasko comments Created 6 years, 5 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 | Annotate | Revision Log
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 static void OnSSLCertificateError( 51 static void OnSSLCertificateError(
52 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate, 52 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate,
53 const GlobalRequestID& id, 53 const GlobalRequestID& id,
54 ResourceType::Type resource_type, 54 ResourceType::Type resource_type,
55 const GURL& url, 55 const GURL& url,
56 int render_process_id, 56 int render_process_id,
57 int render_frame_id, 57 int render_frame_id,
58 const net::SSLInfo& ssl_info, 58 const net::SSLInfo& ssl_info,
59 bool fatal); 59 bool fatal);
60 60
61 // Called before an HTTP basic auth dialog is displayed.
62 static void OnAuthDialog(int render_process_id,
63 int render_frame_host,
Charlie Reis 2014/07/24 18:39:32 nit: render_frame_id (render_frame_host would usua
meacer 2014/07/24 18:48:32 Done.
64 const std::string& serialized_security_info,
65 bool is_main_frame);
66
61 // Called when SSL state for a host or tab changes. 67 // Called when SSL state for a host or tab changes.
62 static void NotifySSLInternalStateChanged(BrowserContext* context); 68 static void NotifySSLInternalStateChanged(BrowserContext* context);
63 69
64 // Construct an SSLManager for the specified tab. 70 // Construct an SSLManager for the specified tab.
65 // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used. 71 // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used.
66 explicit SSLManager(NavigationControllerImpl* controller); 72 explicit SSLManager(NavigationControllerImpl* controller);
67 virtual ~SSLManager(); 73 virtual ~SSLManager();
68 74
69 SSLPolicy* policy() { return policy_.get(); } 75 SSLPolicy* policy() { return policy_.get(); }
70 SSLPolicyBackend* backend() { return &backend_; } 76 SSLPolicyBackend* backend() { return &backend_; }
71 77
72 // The navigation controller associated with this SSLManager. The 78 // The navigation controller associated with this SSLManager. The
73 // NavigationController is guaranteed to outlive the SSLManager. 79 // NavigationController is guaranteed to outlive the SSLManager.
74 NavigationControllerImpl* controller() { return controller_; } 80 NavigationControllerImpl* controller() { return controller_; }
75 81
76 void DidCommitProvisionalLoad(const LoadCommittedDetails& details); 82 void DidCommitProvisionalLoad(const LoadCommittedDetails& details);
77 void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details); 83 void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details);
78 void DidStartResourceResponse(const ResourceRequestDetails& details); 84 void DidStartResourceResponse(const ResourceRequestDetails& details);
79 void DidReceiveResourceRedirect(const ResourceRedirectDetails& details); 85 void DidReceiveResourceRedirect(const ResourceRedirectDetails& details);
80 86
81 // Insecure content entry point. 87 // Insecure content entry point.
82 void DidDisplayInsecureContent(); 88 void DidDisplayInsecureContent();
83 void DidRunInsecureContent(const std::string& security_origin); 89 void DidRunInsecureContent(const std::string& security_origin);
84 90
85 private: 91 private:
86 // Update the NavigationEntry with our current state. 92 // Update the NavigationEntry with our current state.
87 void UpdateEntry(NavigationEntryImpl* entry); 93 void UpdateEntry(NavigationEntryImpl* entry);
94 void UpdateEntry(const std::string& serialized_security_info,
95 bool is_main_frame,
96 NavigationEntryImpl* entry);
88 97
89 // The backend for the SSLPolicy to actuate its decisions. 98 // The backend for the SSLPolicy to actuate its decisions.
90 SSLPolicyBackend backend_; 99 SSLPolicyBackend backend_;
91 100
92 // The SSLPolicy instance for this manager. 101 // The SSLPolicy instance for this manager.
93 scoped_ptr<SSLPolicy> policy_; 102 scoped_ptr<SSLPolicy> policy_;
94 103
95 // The NavigationController that owns this SSLManager. We are responsible 104 // The NavigationController that owns this SSLManager. We are responsible
96 // for the security UI of this tab. 105 // for the security UI of this tab.
97 NavigationControllerImpl* controller_; 106 NavigationControllerImpl* controller_;
98 107
99 DISALLOW_COPY_AND_ASSIGN(SSLManager); 108 DISALLOW_COPY_AND_ASSIGN(SSLManager);
100 }; 109 };
101 110
102 } // namespace content 111 } // namespace content
103 112
104 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ 113 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698