Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Side by Side Diff: components/autofill/core/browser/webdata/autofill_change.h

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "components/autofill/core/browser/webdata/autofill_entry.h" 10 #include "components/autofill/core/browser/webdata/autofill_entry.h"
(...skipping 23 matching lines...) Expand all
34 : type_(type), 34 : type_(type),
35 key_(key) {} 35 key_(key) {}
36 private: 36 private:
37 Type type_; 37 Type type_;
38 KeyType key_; 38 KeyType key_;
39 }; 39 };
40 40
41 class AutofillChange : public GenericAutofillChange<AutofillKey> { 41 class AutofillChange : public GenericAutofillChange<AutofillKey> {
42 public: 42 public:
43 AutofillChange(Type type, const AutofillKey& key); 43 AutofillChange(Type type, const AutofillKey& key);
44 virtual ~AutofillChange(); 44 ~AutofillChange() override;
45 bool operator==(const AutofillChange& change) const { 45 bool operator==(const AutofillChange& change) const {
46 return type() == change.type() && key() == change.key(); 46 return type() == change.type() && key() == change.key();
47 } 47 }
48 }; 48 };
49 49
50 typedef std::vector<AutofillChange> AutofillChangeList; 50 typedef std::vector<AutofillChange> AutofillChangeList;
51 51
52 // Change notification details for Autofill profile changes. 52 // Change notification details for Autofill profile changes.
53 class AutofillProfileChange : public GenericAutofillChange<std::string> { 53 class AutofillProfileChange : public GenericAutofillChange<std::string> {
54 public: 54 public:
55 // The |type| input specifies the change type. The |key| input is the key, 55 // The |type| input specifies the change type. The |key| input is the key,
56 // which is expected to be the GUID identifying the |profile|. 56 // which is expected to be the GUID identifying the |profile|.
57 // When |type| == ADD, |profile| should be non-NULL. 57 // When |type| == ADD, |profile| should be non-NULL.
58 // When |type| == UPDATE, |profile| should be non-NULL. 58 // When |type| == UPDATE, |profile| should be non-NULL.
59 // When |type| == REMOVE, |profile| should be NULL. 59 // When |type| == REMOVE, |profile| should be NULL.
60 AutofillProfileChange(Type type, 60 AutofillProfileChange(Type type,
61 const std::string& key, 61 const std::string& key,
62 const AutofillProfile* profile); 62 const AutofillProfile* profile);
63 virtual ~AutofillProfileChange(); 63 ~AutofillProfileChange() override;
64 64
65 const AutofillProfile* profile() const { return profile_; } 65 const AutofillProfile* profile() const { return profile_; }
66 bool operator==(const AutofillProfileChange& change) const; 66 bool operator==(const AutofillProfileChange& change) const;
67 67
68 private: 68 private:
69 // Weak reference, can be NULL. 69 // Weak reference, can be NULL.
70 const AutofillProfile* profile_; 70 const AutofillProfile* profile_;
71 }; 71 };
72 72
73 } // namespace autofill 73 } // namespace autofill
74 74
75 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ 75 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698