| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_WEBDATA_AUTOFILL_ENTRY_H__ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_ENTRY_H__ |
| 6 #define COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_ENTRY_H__ | 6 #define COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_ENTRY_H__ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/string16.h" | 12 #include "base/string16.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 #include "components/autofill/common/autofill_export.h" |
| 14 | 15 |
| 15 namespace autofill { | 16 namespace autofill { |
| 16 | 17 |
| 17 class AutofillKey { | 18 class AUTOFILL_EXPORT AutofillKey { |
| 18 public: | 19 public: |
| 19 AutofillKey(); | 20 AutofillKey(); |
| 20 AutofillKey(const base::string16& name, const base::string16& value); | 21 AutofillKey(const base::string16& name, const base::string16& value); |
| 21 AutofillKey(const char* name, const char* value); | 22 AutofillKey(const char* name, const char* value); |
| 22 AutofillKey(const AutofillKey& key); | 23 AutofillKey(const AutofillKey& key); |
| 23 virtual ~AutofillKey(); | 24 virtual ~AutofillKey(); |
| 24 | 25 |
| 25 const base::string16& name() const { return name_; } | 26 const base::string16& name() const { return name_; } |
| 26 const base::string16& value() const { return value_; } | 27 const base::string16& value() const { return value_; } |
| 27 | 28 |
| 28 bool operator==(const AutofillKey& key) const; | 29 bool operator==(const AutofillKey& key) const; |
| 29 bool operator<(const AutofillKey& key) const; | 30 bool operator<(const AutofillKey& key) const; |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 base::string16 name_; | 33 base::string16 name_; |
| 33 base::string16 value_; | 34 base::string16 value_; |
| 34 }; | 35 }; |
| 35 | 36 |
| 36 class AutofillEntry { | 37 class AUTOFILL_EXPORT AutofillEntry { |
| 37 public: | 38 public: |
| 38 AutofillEntry(const AutofillKey& key, | 39 AutofillEntry(const AutofillKey& key, |
| 39 const std::vector<base::Time>& timestamps); | 40 const std::vector<base::Time>& timestamps); |
| 40 ~AutofillEntry(); | 41 ~AutofillEntry(); |
| 41 | 42 |
| 42 const AutofillKey& key() const { return key_; } | 43 const AutofillKey& key() const { return key_; } |
| 43 const std::vector<base::Time>& timestamps() const { return timestamps_; } | 44 const std::vector<base::Time>& timestamps() const { return timestamps_; } |
| 44 | 45 |
| 45 bool operator==(const AutofillEntry& entry) const; | 46 bool operator==(const AutofillEntry& entry) const; |
| 46 bool operator<(const AutofillEntry& entry) const; | 47 bool operator<(const AutofillEntry& entry) const; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 66 std::vector<base::Time>* result); | 67 std::vector<base::Time>* result); |
| 67 | 68 |
| 68 AutofillKey key_; | 69 AutofillKey key_; |
| 69 std::vector<base::Time> timestamps_; | 70 std::vector<base::Time> timestamps_; |
| 70 bool timestamps_culled_; | 71 bool timestamps_culled_; |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 } // namespace autofill | 74 } // namespace autofill |
| 74 | 75 |
| 75 #endif // COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_ENTRY_H__ | 76 #endif // COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_ENTRY_H__ |
| OLD | NEW |