| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 void OnURLFetchComplete(const net::URLFetcher* source) override; | 67 void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 68 | 68 |
| 69 GURL main_frame_url() const { return main_frame_url_; } | 69 GURL main_frame_url() const { return main_frame_url_; } |
| 70 | 70 |
| 71 const LoginReputationClientRequest* request_proto() const { | 71 const LoginReputationClientRequest* request_proto() const { |
| 72 return request_proto_.get(); | 72 return request_proto_.get(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 content::WebContents* web_contents() const { return web_contents_; } | 75 content::WebContents* web_contents() const { return web_contents_; } |
| 76 | 76 |
| 77 LoginReputationClientRequest::TriggerType request_type() const { | 77 LoginReputationClientRequest::TriggerType trigger_type() const { |
| 78 return request_type_; | 78 return trigger_type_; |
| 79 } | 79 } |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 friend class base::RefCountedThreadSafe<PasswordProtectionRequest>; | 82 friend class base::RefCountedThreadSafe<PasswordProtectionRequest>; |
| 83 friend struct content::BrowserThread::DeleteOnThread< | 83 friend struct content::BrowserThread::DeleteOnThread< |
| 84 content::BrowserThread::UI>; | 84 content::BrowserThread::UI>; |
| 85 friend class base::DeleteHelper<PasswordProtectionRequest>; | 85 friend class base::DeleteHelper<PasswordProtectionRequest>; |
| 86 ~PasswordProtectionRequest() override; | 86 ~PasswordProtectionRequest() override; |
| 87 | 87 |
| 88 void CheckWhitelistOnUIThread(); | 88 void CheckWhitelistOnUIThread(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // The action URL of the password form. | 122 // The action URL of the password form. |
| 123 const GURL password_form_action_; | 123 const GURL password_form_action_; |
| 124 | 124 |
| 125 // Frame url of the detected password form. | 125 // Frame url of the detected password form. |
| 126 const GURL password_form_frame_url_; | 126 const GURL password_form_frame_url_; |
| 127 | 127 |
| 128 // Domain on which a password is saved and gets reused. | 128 // Domain on which a password is saved and gets reused. |
| 129 const std::string saved_domain_; | 129 const std::string saved_domain_; |
| 130 | 130 |
| 131 // If this request is for unfamiliar login page or for a password reuse event. | 131 // If this request is for unfamiliar login page or for a password reuse event. |
| 132 const LoginReputationClientRequest::TriggerType request_type_; | 132 const LoginReputationClientRequest::TriggerType trigger_type_; |
| 133 | 133 |
| 134 // If there is a password field on the page. | 134 // If there is a password field on the page. |
| 135 const bool password_field_exists_; | 135 const bool password_field_exists_; |
| 136 | 136 |
| 137 // When request is sent. | 137 // When request is sent. |
| 138 base::TimeTicks request_start_time_; | 138 base::TimeTicks request_start_time_; |
| 139 | 139 |
| 140 // URLFetcher instance for sending request and receiving response. | 140 // URLFetcher instance for sending request and receiving response. |
| 141 std::unique_ptr<net::URLFetcher> fetcher_; | 141 std::unique_ptr<net::URLFetcher> fetcher_; |
| 142 | 142 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 153 // Needed for canceling tasks posted to different threads. | 153 // Needed for canceling tasks posted to different threads. |
| 154 base::CancelableTaskTracker tracker_; | 154 base::CancelableTaskTracker tracker_; |
| 155 | 155 |
| 156 base::WeakPtrFactory<PasswordProtectionRequest> weakptr_factory_; | 156 base::WeakPtrFactory<PasswordProtectionRequest> weakptr_factory_; |
| 157 DISALLOW_COPY_AND_ASSIGN(PasswordProtectionRequest); | 157 DISALLOW_COPY_AND_ASSIGN(PasswordProtectionRequest); |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 } // namespace safe_browsing | 160 } // namespace safe_browsing |
| 161 | 161 |
| 162 #endif // COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_REQU
EST_H_ | 162 #endif // COMPONENTS_SAFE_BROWSING_PASSWORD_PROTECTION_PASSWORD_PROTECTION_REQU
EST_H_ |
| OLD | NEW |