| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 // Removes all the expired verdicts from cache. | 74 // Removes all the expired verdicts from cache. |
| 75 void CleanUpExpiredVerdicts(); | 75 void CleanUpExpiredVerdicts(); |
| 76 | 76 |
| 77 // Creates an instance of PasswordProtectionRequest and call Start() on that | 77 // Creates an instance of PasswordProtectionRequest and call Start() on that |
| 78 // instance. This function also insert this request object in |requests_| for | 78 // instance. This function also insert this request object in |requests_| for |
| 79 // record keeping. | 79 // record keeping. |
| 80 void StartRequest(const GURL& main_frame_url, | 80 void StartRequest(const GURL& main_frame_url, |
| 81 const GURL& password_form_action, | 81 const GURL& password_form_action, |
| 82 const GURL& password_form_frame_url, | 82 const GURL& password_form_frame_url, |
| 83 const std::string& legitimate_domain, |
| 83 LoginReputationClientRequest::TriggerType type); | 84 LoginReputationClientRequest::TriggerType type); |
| 84 | 85 |
| 85 virtual void MaybeStartLowReputationRequest( | 86 virtual void MaybeStartLowReputationRequest( |
| 86 const GURL& main_frame_url, | 87 const GURL& main_frame_url, |
| 87 const GURL& password_form_action, | 88 const GURL& password_form_action, |
| 88 const GURL& password_form_frame_url); | 89 const GURL& password_form_frame_url); |
| 89 | 90 |
| 91 virtual void MaybeStartProtectedPasswordEntryRequest( |
| 92 const GURL& main_frame_url, |
| 93 const std::string& legitimate_domain); |
| 94 |
| 90 scoped_refptr<SafeBrowsingDatabaseManager> database_manager(); | 95 scoped_refptr<SafeBrowsingDatabaseManager> database_manager(); |
| 91 | 96 |
| 92 protected: | 97 protected: |
| 93 friend class PasswordProtectionRequest; | 98 friend class PasswordProtectionRequest; |
| 94 | 99 |
| 95 // Called by a PasswordProtectionRequest instance when it finishes to remove | 100 // Called by a PasswordProtectionRequest instance when it finishes to remove |
| 96 // itself from |requests_|. | 101 // itself from |requests_|. |
| 97 virtual void RequestFinished( | 102 virtual void RequestFinished( |
| 98 PasswordProtectionRequest* request, | 103 PasswordProtectionRequest* request, |
| 99 std::unique_ptr<LoginReputationClientResponse> response); | 104 std::unique_ptr<LoginReputationClientResponse> response); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // we need CancelableTaskTracker to cancel tasks posted to IO thread. | 220 // we need CancelableTaskTracker to cancel tasks posted to IO thread. |
| 216 base::CancelableTaskTracker tracker_; | 221 base::CancelableTaskTracker tracker_; |
| 217 | 222 |
| 218 base::WeakPtrFactory<PasswordProtectionService> weak_factory_; | 223 base::WeakPtrFactory<PasswordProtectionService> weak_factory_; |
| 219 DISALLOW_COPY_AND_ASSIGN(PasswordProtectionService); | 224 DISALLOW_COPY_AND_ASSIGN(PasswordProtectionService); |
| 220 }; | 225 }; |
| 221 | 226 |
| 222 } // namespace safe_browsing | 227 } // namespace safe_browsing |
| 223 | 228 |
| 224 #endif // COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_SERV
ICE_H_ | 229 #endif // COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_SERV
ICE_H_ |
| OLD | NEW |