| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_WEBDATA_AUTOFILL_CHANGE_H__ | 5 #ifndef CHROME_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ |
| 6 #define CHROME_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ | 6 #define CHROME_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ |
| 7 | 7 |
| 8 #include "chrome/browser/webdata/autofill_entry.h" | 8 #include "chrome/browser/webdata/autofill_entry.h" |
| 9 | 9 |
| 10 class AutofillChange { | 10 class AutofillChange { |
| 11 public: | 11 public: |
| 12 typedef enum { | 12 typedef enum { |
| 13 ADD, | 13 ADD, |
| 14 UPDATE, | 14 UPDATE, |
| 15 REMOVE | 15 REMOVE |
| 16 } Type; | 16 } Type; |
| 17 | 17 |
| 18 AutofillChange(Type type, const AutofillKey& key) | 18 AutofillChange(Type type, const AutofillKey& key) |
| 19 : type_(type), | 19 : type_(type), |
| 20 key_(key) {} | 20 key_(key) {} |
| 21 virtual ~AutofillChange() {} | 21 virtual ~AutofillChange() {} |
| 22 | 22 |
| 23 Type type() const { return type_; } | 23 Type type() const { return type_; } |
| 24 const AutofillKey& key() const { return key_; } | 24 const AutofillKey& key() const { return key_; } |
| 25 | 25 |
| 26 bool operator==(const AutofillChange& change) const { | 26 bool operator==(const AutofillChange& change) const; |
| 27 return type_ == change.type() && key_ == change.key(); | |
| 28 } | |
| 29 | 27 |
| 30 private: | 28 private: |
| 31 Type type_; | 29 Type type_; |
| 32 AutofillKey key_; | 30 AutofillKey key_; |
| 33 }; | 31 }; |
| 34 | 32 |
| 35 #endif // CHROME_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ | 33 #endif // CHROME_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ |
| OLD | NEW |