| 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_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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/webdata/autofill_entry.h" | 9 #include "chrome/browser/webdata/autofill_entry.h" |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // Change notification details for Autofill profile changes. | 48 // Change notification details for Autofill profile changes. |
| 49 class AutofillProfileChange : public GenericAutofillChange<std::string> { | 49 class AutofillProfileChange : public GenericAutofillChange<std::string> { |
| 50 public: | 50 public: |
| 51 // The |type| input specifies the change type. The |key| input is the key, | 51 // The |type| input specifies the change type. The |key| input is the key, |
| 52 // which is expected to be the GUID identifying the |profile|. | 52 // which is expected to be the GUID identifying the |profile|. |
| 53 // When |type| == ADD, |profile| should be non-NULL. | 53 // When |type| == ADD, |profile| should be non-NULL. |
| 54 // When |type| == UPDATE, |profile| should be non-NULL. | 54 // When |type| == UPDATE, |profile| should be non-NULL. |
| 55 // When |type| == REMOVE, |profile| should be NULL. | 55 // When |type| == REMOVE, |profile| should be NULL. |
| 56 AutofillProfileChange(Type type, | 56 AutofillProfileChange(Type type, |
| 57 std::string key, | 57 const std::string& key, |
| 58 const AutofillProfile* profile); | 58 const AutofillProfile* profile); |
| 59 virtual ~AutofillProfileChange(); | 59 virtual ~AutofillProfileChange(); |
| 60 | 60 |
| 61 const AutofillProfile* profile() const { return profile_; } | 61 const AutofillProfile* profile() const { return profile_; } |
| 62 bool operator==(const AutofillProfileChange& change) const; | 62 bool operator==(const AutofillProfileChange& change) const; |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 // Weak reference, can be NULL. | 65 // Weak reference, can be NULL. |
| 66 const AutofillProfile* profile_; | 66 const AutofillProfile* profile_; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 // Change notification details for Autofill credit card changes. | 69 // Change notification details for Autofill credit card changes. |
| 70 class AutofillCreditCardChange : public GenericAutofillChange<std::string> { | 70 class AutofillCreditCardChange : public GenericAutofillChange<std::string> { |
| 71 public: | 71 public: |
| 72 // The |type| input specifies the change type. The |key| input is the key, | 72 // The |type| input specifies the change type. The |key| input is the key, |
| 73 // which is expected to be the GUID identifying the |credit_card|. | 73 // which is expected to be the GUID identifying the |credit_card|. |
| 74 // When |type| == ADD, |credit_card| should be non-NULL. | 74 // When |type| == ADD, |credit_card| should be non-NULL. |
| 75 // When |type| == UPDATE, |credit_card| should be non-NULL. | 75 // When |type| == UPDATE, |credit_card| should be non-NULL. |
| 76 // When |type| == REMOVE, |credit_card| should be NULL. | 76 // When |type| == REMOVE, |credit_card| should be NULL. |
| 77 AutofillCreditCardChange(Type type, | 77 AutofillCreditCardChange(Type type, |
| 78 std::string key, | 78 const std::string& key, |
| 79 const CreditCard* credit_card); | 79 const CreditCard* credit_card); |
| 80 virtual ~AutofillCreditCardChange(); | 80 virtual ~AutofillCreditCardChange(); |
| 81 | 81 |
| 82 const CreditCard* credit_card() const { return credit_card_; } | 82 const CreditCard* credit_card() const { return credit_card_; } |
| 83 bool operator==(const AutofillCreditCardChange& change) const; | 83 bool operator==(const AutofillCreditCardChange& change) const; |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 // Weak reference, can be NULL. | 86 // Weak reference, can be NULL. |
| 87 const CreditCard* credit_card_; | 87 const CreditCard* credit_card_; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 #endif // CHROME_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ | 90 #endif // CHROME_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ |
| OLD | NEW |