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 3// found in the LICENSE file. 4 5#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_ENTRY_H__ 6#define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_ENTRY_H__ 7 8#include "base/strings/string16.h" 9#include "base/time/time.h" 10 11namespace autofill { 12 13class AutofillKey { 14 public: 15 AutofillKey(); 16 AutofillKey(const base::string16& name, const base::string16& value); 17 AutofillKey(const char* name, const char* value); 18 AutofillKey(const AutofillKey& key); 19 virtual ~AutofillKey(); 20 21 const base::string16& name() const { return name_; } 22 const base::string16& value() const { return value_; } 23 24 bool operator==(const AutofillKey& key) const; 25 bool operator<(const AutofillKey& key) const; 26 27 private: 28 base::string16 name_; 29 base::string16 value_; 30}; 31 32class AutofillEntry { 33 public: 34 AutofillEntry(const AutofillKey& key, 35 const base::Time& date_created, 36 const base::Time& date_last_used); 37 ~AutofillEntry(); 38 39 const AutofillKey& key() const { return key_; } 40 const base::Time& date_created() const { return date_created_; } 41 const base::Time& date_last_used() const { return date_last_used_; } 42 43 bool operator==(const AutofillEntry& entry) const; 44 bool operator<(const AutofillEntry& entry) const; 45 46 private: 47 AutofillKey key_; 48 base::Time date_created_; 49 base::Time date_last_used_; 50}; 51 52} // namespace autofill 53 54#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_ENTRY_H__ 55