summaryrefslogtreecommitdiff
path: root/chromium/components/autofill/core/common/form_field_data_predictions.cc
blob: 25c883c02fd76ef0ae0164cd8fc840bb5e84257a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2013 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.

#include "components/autofill/core/common/form_field_data_predictions.h"

namespace autofill {

FormFieldDataPredictions::FormFieldDataPredictions() {
}

FormFieldDataPredictions::FormFieldDataPredictions(
    const FormFieldDataPredictions& other)
    : field(other.field),
      signature(other.signature),
      heuristic_type(other.heuristic_type),
      server_type(other.server_type),
      overall_type(other.overall_type),
      parseable_name(other.parseable_name) {
}

FormFieldDataPredictions::~FormFieldDataPredictions() {
}

bool FormFieldDataPredictions::operator==(
    const FormFieldDataPredictions& predictions) const {
  return (field.SameFieldAs(predictions.field) &&
          signature == predictions.signature &&
          heuristic_type == predictions.heuristic_type &&
          server_type == predictions.server_type &&
          overall_type == predictions.overall_type &&
          parseable_name == predictions.parseable_name);
}

bool FormFieldDataPredictions::operator!=(
    const FormFieldDataPredictions& predictions) const {
  return !operator==(predictions);
}

}  // namespace autofill