| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_SERVICE
_H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_SERVICE
_H_ |
| 6 #define COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_SERVICE
_H_ | 6 #define COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_SERVICE
_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 void CleanUpExpiredVerdicts(); | 99 void CleanUpExpiredVerdicts(); |
| 100 | 100 |
| 101 // Creates an instance of PasswordProtectionRequest and call Start() on that | 101 // Creates an instance of PasswordProtectionRequest and call Start() on that |
| 102 // instance. This function also insert this request object in |requests_| for | 102 // instance. This function also insert this request object in |requests_| for |
| 103 // record keeping. | 103 // record keeping. |
| 104 void StartRequest(content::WebContents* web_contents, | 104 void StartRequest(content::WebContents* web_contents, |
| 105 const GURL& main_frame_url, | 105 const GURL& main_frame_url, |
| 106 const GURL& password_form_action, | 106 const GURL& password_form_action, |
| 107 const GURL& password_form_frame_url, | 107 const GURL& password_form_frame_url, |
| 108 const std::string& saved_domain, | 108 const std::string& saved_domain, |
| 109 LoginReputationClientRequest::TriggerType type); | 109 LoginReputationClientRequest::TriggerType type, |
| 110 bool password_field_exists); |
| 110 | 111 |
| 111 virtual void MaybeStartPasswordFieldOnFocusRequest( | 112 virtual void MaybeStartPasswordFieldOnFocusRequest( |
| 112 content::WebContents* web_contents, | 113 content::WebContents* web_contents, |
| 113 const GURL& main_frame_url, | 114 const GURL& main_frame_url, |
| 114 const GURL& password_form_action, | 115 const GURL& password_form_action, |
| 115 const GURL& password_form_frame_url); | 116 const GURL& password_form_frame_url); |
| 116 | 117 |
| 117 virtual void MaybeStartProtectedPasswordEntryRequest( | 118 virtual void MaybeStartProtectedPasswordEntryRequest( |
| 118 content::WebContents* web_contents, | 119 content::WebContents* web_contents, |
| 119 const GURL& main_frame_url, | 120 const GURL& main_frame_url, |
| 120 const std::string& saved_domain); | 121 const std::string& saved_domain, |
| 122 bool password_field_exists); |
| 121 | 123 |
| 122 scoped_refptr<SafeBrowsingDatabaseManager> database_manager(); | 124 scoped_refptr<SafeBrowsingDatabaseManager> database_manager(); |
| 123 | 125 |
| 124 // Safe Browsing backend cannot get a reliable reputation of a URL if | 126 // Safe Browsing backend cannot get a reliable reputation of a URL if |
| 125 // (1) URL is not valid | 127 // (1) URL is not valid |
| 126 // (2) URL doesn't have http or https scheme | 128 // (2) URL doesn't have http or https scheme |
| 127 // (3) It maps to a local host. | 129 // (3) It maps to a local host. |
| 128 // (4) Its hostname is an IP Address in an IANA-reserved range. | 130 // (4) Its hostname is an IP Address in an IANA-reserved range. |
| 129 // (5) Its hostname is a not-yet-assigned by ICANN gTLD. | 131 // (5) Its hostname is a not-yet-assigned by ICANN gTLD. |
| 130 // (6) Its hostname is a dotless domain. | 132 // (6) Its hostname is a dotless domain. |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 // we need CancelableTaskTracker to cancel tasks posted to IO thread. | 268 // we need CancelableTaskTracker to cancel tasks posted to IO thread. |
| 267 base::CancelableTaskTracker tracker_; | 269 base::CancelableTaskTracker tracker_; |
| 268 | 270 |
| 269 base::WeakPtrFactory<PasswordProtectionService> weak_factory_; | 271 base::WeakPtrFactory<PasswordProtectionService> weak_factory_; |
| 270 DISALLOW_COPY_AND_ASSIGN(PasswordProtectionService); | 272 DISALLOW_COPY_AND_ASSIGN(PasswordProtectionService); |
| 271 }; | 273 }; |
| 272 | 274 |
| 273 } // namespace safe_browsing | 275 } // namespace safe_browsing |
| 274 | 276 |
| 275 #endif // COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_SERV
ICE_H_ | 277 #endif // COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_SERV
ICE_H_ |
| OLD | NEW |