Chromium Code Reviews| 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_REQUEST _H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_REQUEST _H_ |
| 6 #define COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_REQUEST _H_ | 6 #define COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_REQUEST _H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/task/cancelable_task_tracker.h" | 10 #include "base/task/cancelable_task_tracker.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 REQUEST_MALFORMED = 8, | 54 REQUEST_MALFORMED = 8, |
| 55 FETCH_FAILED = 9, | 55 FETCH_FAILED = 9, |
| 56 RESPONSE_MALFORMED = 10, | 56 RESPONSE_MALFORMED = 10, |
| 57 SERVICE_DESTROYED = 11, | 57 SERVICE_DESTROYED = 11, |
| 58 MAX_OUTCOME | 58 MAX_OUTCOME |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 PasswordProtectionRequest(const GURL& main_frame_url, | 61 PasswordProtectionRequest(const GURL& main_frame_url, |
| 62 const GURL& password_form_action, | 62 const GURL& password_form_action, |
| 63 const GURL& password_form_frame_url, | 63 const GURL& password_form_frame_url, |
| 64 const std::string& legitinate_domain, | |
|
Nathan Parker
2017/05/12 22:27:59
nit: spelling. legitimate_domain
Jialiu Lin
2017/05/13 00:24:12
Done.
| |
| 64 LoginReputationClientRequest::TriggerType type, | 65 LoginReputationClientRequest::TriggerType type, |
| 65 PasswordProtectionService* pps, | 66 PasswordProtectionService* pps, |
| 66 int request_timeout_in_ms); | 67 int request_timeout_in_ms); |
| 67 | 68 |
| 68 base::WeakPtr<PasswordProtectionRequest> GetWeakPtr() { | 69 base::WeakPtr<PasswordProtectionRequest> GetWeakPtr() { |
| 69 return weakptr_factory_.GetWeakPtr(); | 70 return weakptr_factory_.GetWeakPtr(); |
| 70 } | 71 } |
| 71 | 72 |
| 72 // Starts processing request by checking extended reporting and incognito | 73 // Starts processing request by checking extended reporting and incognito |
| 73 // conditions. | 74 // conditions. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 | 121 |
| 121 // Main frame URL of the login form. | 122 // Main frame URL of the login form. |
| 122 const GURL main_frame_url_; | 123 const GURL main_frame_url_; |
| 123 | 124 |
| 124 // The action URL of the password form. | 125 // The action URL of the password form. |
| 125 const GURL password_form_action_; | 126 const GURL password_form_action_; |
| 126 | 127 |
| 127 // Frame url of the detected password form. | 128 // Frame url of the detected password form. |
| 128 const GURL password_form_frame_url_; | 129 const GURL password_form_frame_url_; |
| 129 | 130 |
| 131 // Legitimate domain on which a password is saved and gets reused. | |
| 132 const std::string legitimate_domain_; | |
|
Nathan Parker
2017/05/12 22:27:59
Could we call this "saved_domain" or "associated_d
Jialiu Lin
2017/05/13 00:24:12
Rename to "saved_domain".
"legitimate_domain" is u
| |
| 133 | |
| 130 // If this request is for unfamiliar login page or for a password reuse event. | 134 // If this request is for unfamiliar login page or for a password reuse event. |
| 131 const LoginReputationClientRequest::TriggerType request_type_; | 135 const LoginReputationClientRequest::TriggerType request_type_; |
| 132 | 136 |
| 133 // When request is sent. | 137 // When request is sent. |
| 134 base::TimeTicks request_start_time_; | 138 base::TimeTicks request_start_time_; |
| 135 | 139 |
| 136 // URLFetcher instance for sending request and receiving response. | 140 // URLFetcher instance for sending request and receiving response. |
| 137 std::unique_ptr<net::URLFetcher> fetcher_; | 141 std::unique_ptr<net::URLFetcher> fetcher_; |
| 138 | 142 |
| 139 // The PasswordProtectionService instance owns |this|. | 143 // The PasswordProtectionService instance owns |this|. |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 153 // Needed for canceling tasks posted to different threads. | 157 // Needed for canceling tasks posted to different threads. |
| 154 base::CancelableTaskTracker tracker_; | 158 base::CancelableTaskTracker tracker_; |
| 155 | 159 |
| 156 base::WeakPtrFactory<PasswordProtectionRequest> weakptr_factory_; | 160 base::WeakPtrFactory<PasswordProtectionRequest> weakptr_factory_; |
| 157 DISALLOW_COPY_AND_ASSIGN(PasswordProtectionRequest); | 161 DISALLOW_COPY_AND_ASSIGN(PasswordProtectionRequest); |
| 158 }; | 162 }; |
| 159 | 163 |
| 160 } // namespace safe_browsing | 164 } // namespace safe_browsing |
| 161 | 165 |
| 162 #endif // COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_REQU EST_H_ | 166 #endif // COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_REQU EST_H_ |
| OLD | NEW |