| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 void SaveGenerationFieldDetectedByClassifier( | 239 void SaveGenerationFieldDetectedByClassifier( |
| 240 const base::string16& generation_field); | 240 const base::string16& generation_field); |
| 241 | 241 |
| 242 FormSaver* form_saver() { return form_saver_.get(); } | 242 FormSaver* form_saver() { return form_saver_.get(); } |
| 243 | 243 |
| 244 // Clears references to matches derived from the associated FormFetcher data. | 244 // Clears references to matches derived from the associated FormFetcher data. |
| 245 // After calling this, the PasswordFormManager holds no references to objects | 245 // After calling this, the PasswordFormManager holds no references to objects |
| 246 // owned by the associated FormFetcher. | 246 // owned by the associated FormFetcher. |
| 247 void ResetStoredMatches(); | 247 void ResetStoredMatches(); |
| 248 | 248 |
| 249 // Takes ownership of |fetcher|. |
| 250 // TODO(crbug.com/621355) Until https://codereview.chromium.org/2758773002/, |
| 251 // |fetcher.get()| must be the same as |form_fetcher_|. |
| 252 void GrabFetcher(std::unique_ptr<FormFetcher> fetcher); |
| 253 |
| 249 protected: | 254 protected: |
| 250 // FormFetcher::Consumer: | 255 // FormFetcher::Consumer: |
| 251 void ProcessMatches( | 256 void ProcessMatches( |
| 252 const std::vector<const autofill::PasswordForm*>& non_federated, | 257 const std::vector<const autofill::PasswordForm*>& non_federated, |
| 253 size_t filtered_count) override; | 258 size_t filtered_count) override; |
| 254 | 259 |
| 255 private: | 260 private: |
| 256 // ManagerAction - What does the manager do with this form? Either it | 261 // ManagerAction - What does the manager do with this form? Either it |
| 257 // fills it, or it doesn't. If it doesn't fill it, that's either | 262 // fills it, or it doesn't. If it doesn't fill it, that's either |
| 258 // because it has no match or it is disabled via the AUTOCOMPLETE=off | 263 // because it has no match or it is disabled via the AUTOCOMPLETE=off |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 FormType form_type_; | 563 FormType form_type_; |
| 559 | 564 |
| 560 // FormSaver instance used by |this| to all tasks related to storing | 565 // FormSaver instance used by |this| to all tasks related to storing |
| 561 // credentials. | 566 // credentials. |
| 562 std::unique_ptr<FormSaver> form_saver_; | 567 std::unique_ptr<FormSaver> form_saver_; |
| 563 | 568 |
| 564 // When not null, then this is the object which |form_fetcher_| points to. | 569 // When not null, then this is the object which |form_fetcher_| points to. |
| 565 std::unique_ptr<FormFetcher> owned_form_fetcher_; | 570 std::unique_ptr<FormFetcher> owned_form_fetcher_; |
| 566 | 571 |
| 567 // FormFetcher instance which owns the login data from PasswordStore. | 572 // FormFetcher instance which owns the login data from PasswordStore. |
| 568 FormFetcher* const form_fetcher_; | 573 FormFetcher* form_fetcher_; |
| 569 | 574 |
| 570 // True if the main frame's visible URL, at the time this PasswordFormManager | 575 // True if the main frame's visible URL, at the time this PasswordFormManager |
| 571 // was created, is secure. | 576 // was created, is secure. |
| 572 bool is_main_frame_secure_ = false; | 577 bool is_main_frame_secure_ = false; |
| 573 | 578 |
| 574 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); | 579 DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); |
| 575 }; | 580 }; |
| 576 | 581 |
| 577 } // namespace password_manager | 582 } // namespace password_manager |
| 578 | 583 |
| 579 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_ | 584 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_MANAGER_H_ |
| OLD | NEW |