ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / components / autofill / core / browser / email_field.cc
blobcfe4a1a187405a2fc068c42243a87bcb136a75c7
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.
5 #include "components/autofill/core/browser/email_field.h"
7 #include "base/strings/utf_string_conversions.h"
8 #include "components/autofill/core/browser/autofill_regex_constants.h"
9 #include "components/autofill/core/browser/autofill_scanner.h"
11 namespace autofill {
13 // static
14 scoped_ptr<FormField> EmailField::Parse(AutofillScanner* scanner) {
15 AutofillField* field;
16 if (ParseFieldSpecifics(scanner, base::UTF8ToUTF16(kEmailRe),
17 MATCH_DEFAULT | MATCH_EMAIL, &field)) {
18 return make_scoped_ptr(new EmailField(field));
21 return NULL;
24 EmailField::EmailField(const AutofillField* field) : field_(field) {
27 bool EmailField::ClassifyField(ServerFieldTypeMap* map) const {
28 return AddClassification(field_, EMAIL_ADDRESS, map);
31 } // namespace autofill