| 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" |
| 11 #include "components/security_state/core/security_state.h" | 11 #include "components/security_state/core/security_state.h" |
| 12 #include "content/public/browser/web_contents_observer.h" | 12 #include "content/public/browser/web_contents_observer.h" |
| 13 #include "content/public/browser/web_contents_user_data.h" | 13 #include "content/public/browser/web_contents_user_data.h" |
| 14 #include "third_party/WebKit/public/platform/WebSecurityStyle.h" | 14 #include "third_party/WebKit/public/platform/WebSecurityStyle.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 struct SecurityStyleExplanations; | |
| 18 class NavigationHandle; | 17 class NavigationHandle; |
| 19 class WebContents; | 18 class WebContents; |
| 20 } // namespace content | 19 } // namespace content |
| 21 | 20 |
| 22 // Tab helper provides the page's security status. Also logs console warnings | 21 // Tab helper provides the page's security status. Also logs console warnings |
| 23 // for private data on insecure pages. | 22 // for private data on insecure pages. |
| 24 class SecurityStateTabHelper | 23 class SecurityStateTabHelper |
| 25 : public content::WebContentsObserver, | 24 : public content::WebContentsObserver, |
| 26 public content::WebContentsUserData<SecurityStateTabHelper> { | 25 public content::WebContentsUserData<SecurityStateTabHelper> { |
| 27 public: | 26 public: |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // HTTP pages that contain password or credit card fields. This is set | 59 // 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 | 60 // at most once per main-frame navigation (the first time that an HTTP |
| 62 // warning triggers on that navigation) and is used for UMA | 61 // warning triggers on that navigation) and is used for UMA |
| 63 // histogramming. | 62 // histogramming. |
| 64 base::Time time_of_http_warning_on_current_navigation_; | 63 base::Time time_of_http_warning_on_current_navigation_; |
| 65 | 64 |
| 66 DISALLOW_COPY_AND_ASSIGN(SecurityStateTabHelper); | 65 DISALLOW_COPY_AND_ASSIGN(SecurityStateTabHelper); |
| 67 }; | 66 }; |
| 68 | 67 |
| 69 #endif // CHROME_BROWSER_SSL_SECURITY_STATE_TAB_HELPER_H_ | 68 #endif // CHROME_BROWSER_SSL_SECURITY_STATE_TAB_HELPER_H_ |
| OLD | NEW |