OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SECURITY_STATE_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SSL_SECURITY_STATE_TAB_HELPER_H_ |
6 #define CHROME_BROWSER_SSL_SECURITY_STATE_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_SSL_SECURITY_STATE_TAB_HELPER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 // See security_state::GetSecurityInfo. | 30 // See security_state::GetSecurityInfo. |
31 void GetSecurityInfo( | 31 void GetSecurityInfo( |
32 security_state::SecurityInfo* result) const; | 32 security_state::SecurityInfo* result) const; |
33 | 33 |
34 // Called when the NavigationEntry's SSLStatus or other security | 34 // Called when the NavigationEntry's SSLStatus or other security |
35 // information changes. | 35 // information changes. |
36 void VisibleSecurityStateChanged(); | 36 void VisibleSecurityStateChanged(); |
37 | 37 |
38 // content::WebContentsObserver: | 38 // content::WebContentsObserver: |
| 39 void DidStartNavigation( |
| 40 content::NavigationHandle* navigation_handle) override; |
39 void DidFinishNavigation( | 41 void DidFinishNavigation( |
40 content::NavigationHandle* navigation_handle) override; | 42 content::NavigationHandle* navigation_handle) override; |
| 43 void WebContentsDestroyed() override; |
41 | 44 |
42 private: | 45 private: |
43 explicit SecurityStateTabHelper(content::WebContents* web_contents); | 46 explicit SecurityStateTabHelper(content::WebContents* web_contents); |
44 friend class content::WebContentsUserData<SecurityStateTabHelper>; | 47 friend class content::WebContentsUserData<SecurityStateTabHelper>; |
45 | 48 |
46 bool UsedPolicyInstalledCertificate() const; | 49 bool UsedPolicyInstalledCertificate() const; |
47 security_state::MaliciousContentStatus GetMaliciousContentStatus() const; | 50 security_state::MaliciousContentStatus GetMaliciousContentStatus() const; |
48 std::unique_ptr<security_state::VisibleSecurityState> | 51 std::unique_ptr<security_state::VisibleSecurityState> |
49 GetVisibleSecurityState() const; | 52 GetVisibleSecurityState() const; |
50 | 53 |
51 // True if a console message has been logged about an omnibox warning that | 54 // True if a console message has been logged about an omnibox warning that |
52 // will be shown in future versions of Chrome for insecure HTTP pages. This | 55 // will be shown in future versions of Chrome for insecure HTTP pages. This |
53 // message should only be logged once per main-frame navigation. | 56 // message should only be logged once per main-frame navigation. |
54 bool logged_http_warning_on_current_navigation_; | 57 bool logged_http_warning_on_current_navigation_; |
55 | 58 |
| 59 // The time that a console or omnibox warning was shown for insecure |
| 60 // HTTP pages that contain password or credit card fields. This is set |
| 61 // at most once per main-frame navigation (the first time that an HTTP |
| 62 // warning triggers on that navigation) and is used for UMA |
| 63 // histogramming. |
| 64 base::Time time_of_http_warning_on_current_navigation_; |
| 65 |
56 DISALLOW_COPY_AND_ASSIGN(SecurityStateTabHelper); | 66 DISALLOW_COPY_AND_ASSIGN(SecurityStateTabHelper); |
57 }; | 67 }; |
58 | 68 |
59 #endif // CHROME_BROWSER_SSL_SECURITY_STATE_TAB_HELPER_H_ | 69 #endif // CHROME_BROWSER_SSL_SECURITY_STATE_TAB_HELPER_H_ |
OLD | NEW |