X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcomponents%2Fpassword_manager%2Fcore%2Fbrowser%2Fpassword_manager.h;h=05a1ee47f3526ebc9bd06ba651127025ca3991d2;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=b8efde51cec758f9e03b6c2b60f7ce28bf85aa86;hpb=aa3def3a0a4d8298eaa7f7a76cd2fe45cce62046;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/components/password_manager/core/browser/password_manager.h b/src/components/password_manager/core/browser/password_manager.h index b8efde5..05a1ee4 100644 --- a/src/components/password_manager/core/browser/password_manager.h +++ b/src/components/password_manager/core/browser/password_manager.h @@ -95,7 +95,8 @@ class PasswordManager : public LoginModel { // Handles password forms being rendered. void OnPasswordFormsRendered( - const std::vector& visible_forms); + const std::vector& visible_forms, + bool did_stop_loading); // Handles a password form being submitted. virtual void OnPasswordFormSubmitted( @@ -112,9 +113,15 @@ class PasswordManager : public LoginModel { FORM_BLACKLISTED, INVALID_FORM, AUTOCOMPLETE_OFF, + SYNC_CREDENTIAL, MAX_FAILURE_VALUE }; + // Returns if the password manager is enabled for this page. There are certain + // situations (e.g. bad SSL cert) where we disable the password manager + // temporarily. + bool IsEnabledForCurrentPage() const; + // Log failure for UMA. Logs additional metrics if the |form_origin| // corresponds to one of the top, explicitly monitored websites. For some // values of |failure| also sends logs to the internals page through |logger|, @@ -177,9 +184,9 @@ class PasswordManager : public LoginModel { // The platform-level driver. Must outlive this class. PasswordManagerDriver* const driver_; - // Set to false to disable the password manager (will no longer ask if you + // Set to false to disable password saving (will no longer ask if you // want to save passwords but will continue to fill passwords). - BooleanPrefMember password_manager_enabled_; + BooleanPrefMember saving_passwords_enabled_; // Observers to be notified of LoginModel events. This is mutable to allow // notification in const member functions. @@ -188,6 +195,12 @@ class PasswordManager : public LoginModel { // Callbacks to be notified when a password form has been submitted. std::vector submission_callbacks_; + // Records all visible forms seen during a page load, in all frames of the + // page. When the page stops loading, the password manager checks if one of + // the recorded forms matches the login form from the previous page + // (to see if the login was a failure), and clears the vector. + std::vector all_visible_forms_; + DISALLOW_COPY_AND_ASSIGN(PasswordManager); };