diff options
Diffstat (limited to 'chrome/browser/webdata/autofill_change.h')
-rw-r--r-- | chrome/browser/webdata/autofill_change.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/chrome/browser/webdata/autofill_change.h b/chrome/browser/webdata/autofill_change.h new file mode 100644 index 0000000..2eb8d50 --- /dev/null +++ b/chrome/browser/webdata/autofill_change.h @@ -0,0 +1,35 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ +#define CHROME_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ + +#include "chrome/browser/webdata/autofill_entry.h" + +class AutofillChange { + public: + typedef enum { + ADD, + UPDATE, + REMOVE + } Type; + + AutofillChange(Type type, const AutofillKey& key) + : type_(type), + key_(key) {} + virtual ~AutofillChange() {} + + Type type() const { return type_; } + const AutofillKey& key() const { return key_; } + + bool operator==(const AutofillChange& change) const { + return type_ == change.type() && key_ == change.key(); + } + + private: + Type type_; + AutofillKey key_; +}; + +#endif // CHROME_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__ |