| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_CHANGE_H__ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_CHANGE_H__ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_CHANGE_H__ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_CHANGE_H__ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "webkit/forms/password_form.h" | 10 #include "content/public/common/password_form.h" |
| 11 | 11 |
| 12 class PasswordStoreChange { | 12 class PasswordStoreChange { |
| 13 public: | 13 public: |
| 14 enum Type { | 14 enum Type { |
| 15 ADD, | 15 ADD, |
| 16 UPDATE, | 16 UPDATE, |
| 17 REMOVE, | 17 REMOVE, |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 PasswordStoreChange(Type type, const webkit::forms::PasswordForm& form) | 20 PasswordStoreChange(Type type, const content::PasswordForm& form) |
| 21 : type_(type), form_(form) { | 21 : type_(type), form_(form) { |
| 22 } | 22 } |
| 23 virtual ~PasswordStoreChange() {} | 23 virtual ~PasswordStoreChange() {} |
| 24 | 24 |
| 25 Type type() const { return type_; } | 25 Type type() const { return type_; } |
| 26 const webkit::forms::PasswordForm& form() const { return form_; } | 26 const content::PasswordForm& form() const { return form_; } |
| 27 | 27 |
| 28 bool operator==(const PasswordStoreChange& other) const { | 28 bool operator==(const PasswordStoreChange& other) const { |
| 29 return type() == other.type() && | 29 return type() == other.type() && |
| 30 form().signon_realm == other.form().signon_realm && | 30 form().signon_realm == other.form().signon_realm && |
| 31 form().origin == other.form().origin && | 31 form().origin == other.form().origin && |
| 32 form().action == other.form().action && | 32 form().action == other.form().action && |
| 33 form().submit_element == other.form().submit_element && | 33 form().submit_element == other.form().submit_element && |
| 34 form().username_element == other.form().username_element && | 34 form().username_element == other.form().username_element && |
| 35 form().username_value == other.form().username_value && | 35 form().username_value == other.form().username_value && |
| 36 form().password_element == other.form().password_element && | 36 form().password_element == other.form().password_element && |
| 37 form().password_value == other.form().password_value && | 37 form().password_value == other.form().password_value && |
| 38 form().old_password_element == other.form().old_password_element && | 38 form().old_password_element == other.form().old_password_element && |
| 39 form().old_password_value == other.form().old_password_value && | 39 form().old_password_value == other.form().old_password_value && |
| 40 form().ssl_valid == other.form().ssl_valid && | 40 form().ssl_valid == other.form().ssl_valid && |
| 41 form().preferred == other.form().preferred && | 41 form().preferred == other.form().preferred && |
| 42 form().date_created == other.form().date_created && | 42 form().date_created == other.form().date_created && |
| 43 form().blacklisted_by_user == other.form().blacklisted_by_user; | 43 form().blacklisted_by_user == other.form().blacklisted_by_user; |
| 44 } | 44 } |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 Type type_; | 47 Type type_; |
| 48 webkit::forms::PasswordForm form_; | 48 content::PasswordForm form_; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 typedef std::vector<PasswordStoreChange> PasswordStoreChangeList; | 51 typedef std::vector<PasswordStoreChange> PasswordStoreChangeList; |
| 52 | 52 |
| 53 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_CHANGE_H_ | 53 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_CHANGE_H_ |
| OLD | NEW |