1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_CHANGE_H__
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_CHANGE_H__
10 #include "components/autofill/core/common/password_form.h"
12 namespace password_manager {
14 class PasswordStoreChange {
22 PasswordStoreChange(Type type, const autofill::PasswordForm& form)
23 : type_(type), form_(form) {
25 virtual ~PasswordStoreChange() {}
27 Type type() const { return type_; }
28 const autofill::PasswordForm& form() const { return form_; }
30 bool operator==(const PasswordStoreChange& other) const {
31 return type() == other.type() &&
32 form().signon_realm == other.form().signon_realm &&
33 form().origin == other.form().origin &&
34 form().action == other.form().action &&
35 form().submit_element == other.form().submit_element &&
36 form().username_element == other.form().username_element &&
37 form().username_value == other.form().username_value &&
38 form().password_element == other.form().password_element &&
39 form().password_value == other.form().password_value &&
40 form().new_password_element == other.form().new_password_element &&
41 form().new_password_value == other.form().new_password_value &&
42 form().ssl_valid == other.form().ssl_valid &&
43 form().preferred == other.form().preferred &&
44 form().date_created == other.form().date_created &&
45 form().blacklisted_by_user == other.form().blacklisted_by_user;
50 autofill::PasswordForm form_;
53 typedef std::vector<PasswordStoreChange> PasswordStoreChangeList;
55 } // namespace password_manager
57 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_CHANGE_H_