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

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

Issue 1415923015: Downgrade lock icon for broken-HTTPS subresources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary includes Created 5 years, 1 month 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 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 13 matching lines...) Expand all
24 24
25 namespace content { 25 namespace content {
26 class BrowserContext; 26 class BrowserContext;
27 class NavigationEntryImpl; 27 class NavigationEntryImpl;
28 class NavigationControllerImpl; 28 class NavigationControllerImpl;
29 class SSLPolicy; 29 class SSLPolicy;
30 struct LoadCommittedDetails; 30 struct LoadCommittedDetails;
31 struct LoadFromMemoryCacheDetails; 31 struct LoadFromMemoryCacheDetails;
32 struct ResourceRedirectDetails; 32 struct ResourceRedirectDetails;
33 struct ResourceRequestDetails; 33 struct ResourceRequestDetails;
34 struct SSLStatus;
34 35
35 // The SSLManager SSLManager controls the SSL UI elements in a WebContents. It 36 // The SSLManager SSLManager controls the SSL UI elements in a WebContents. It
36 // listens for various events that influence when these elements should or 37 // listens for various events that influence when these elements should or
37 // should not be displayed and adjusts them accordingly. 38 // should not be displayed and adjusts them accordingly.
38 // 39 //
39 // There is one SSLManager per tab. 40 // There is one SSLManager per tab.
40 // The security state (secure/insecure) is stored in the navigation entry. 41 // The security state (secure/insecure) is stored in the navigation entry.
41 // Along with it are stored any SSL error code and the associated cert. 42 // Along with it are stored any SSL error code and the associated cert.
42 43
43 class CONTENT_EXPORT SSLManager { 44 class CONTENT_EXPORT SSLManager {
(...skipping 27 matching lines...) Expand all
71 // The navigation controller associated with this SSLManager. The 72 // The navigation controller associated with this SSLManager. The
72 // NavigationController is guaranteed to outlive the SSLManager. 73 // NavigationController is guaranteed to outlive the SSLManager.
73 NavigationControllerImpl* controller() { return controller_; } 74 NavigationControllerImpl* controller() { return controller_; }
74 75
75 void DidCommitProvisionalLoad(const LoadCommittedDetails& details); 76 void DidCommitProvisionalLoad(const LoadCommittedDetails& details);
76 void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details); 77 void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details);
77 void DidStartResourceResponse(const ResourceRequestDetails& details); 78 void DidStartResourceResponse(const ResourceRequestDetails& details);
78 void DidReceiveResourceRedirect(const ResourceRedirectDetails& details); 79 void DidReceiveResourceRedirect(const ResourceRedirectDetails& details);
79 80
80 // Insecure content entry point. 81 // Insecure content entry point.
81 void DidDisplayInsecureContent();
82 void DidRunInsecureContent(const std::string& security_origin); 82 void DidRunInsecureContent(const std::string& security_origin);
83 83
84 // Returns true if content loaded as a subresource with certificate
85 // errors are relevant to the SSL UI for the page, or false if it should
jww 2015/11/20 01:25:08 nit: missing word? "errors are" -> "errors that ar
estark 2015/11/23 23:40:24 Done.
86 // be ignored. Subresources with certificate errors are not considered
87 // relevant when the main page is loaded over HTTP, or when the
88 // subresource's cert errors are duplicative with the main
89 // resource. (When the main resource has certificate errors, the UI
90 // should just describe that instead of describing all the subresources
91 // on the page that have the same certificate errors.)
92 bool IsContentWithCertificateErrorsRelevant(const GURL& url,
jww 2015/11/20 01:25:08 nit: I'd love for this name to say something like
estark 2015/11/23 23:40:24 Done.
93 const SSLStatus& ssl);
94
84 private: 95 private:
85 // Updates the NavigationEntry with our current state. This will 96 // Updates the NavigationEntry with our current state. This will
86 // notify the WebContents of an SSL state change if a change was 97 // notify the WebContents of an SSL state change if a change was
87 // actually made. 98 // actually made.
88 void UpdateEntry(NavigationEntryImpl* entry); 99 void UpdateEntry(NavigationEntryImpl* entry);
89 100
90 // Notifies the WebContents that the SSL state changed. 101 // Notifies the WebContents that the SSL state changed.
91 void NotifyDidChangeVisibleSSLState(); 102 void NotifyDidChangeVisibleSSLState();
92 103
93 // The backend for the SSLPolicy to actuate its decisions. 104 // The backend for the SSLPolicy to actuate its decisions.
94 SSLPolicyBackend backend_; 105 SSLPolicyBackend backend_;
95 106
96 // The SSLPolicy instance for this manager. 107 // The SSLPolicy instance for this manager.
97 scoped_ptr<SSLPolicy> policy_; 108 scoped_ptr<SSLPolicy> policy_;
98 109
99 // The NavigationController that owns this SSLManager. We are responsible 110 // The NavigationController that owns this SSLManager. We are responsible
100 // for the security UI of this tab. 111 // for the security UI of this tab.
101 NavigationControllerImpl* controller_; 112 NavigationControllerImpl* controller_;
102 113
103 DISALLOW_COPY_AND_ASSIGN(SSLManager); 114 DISALLOW_COPY_AND_ASSIGN(SSLManager);
104 }; 115 };
105 116
106 } // namespace content 117 } // namespace content
107 118
108 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ 119 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698