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