Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: components/autofill/content/browser/wallet/form_field_error.h

Issue 22009003: [Autofill] Distinguish between native field types and potentially HTML field types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_BROWSER_WALLET_FORM_FIELD_ERROR_H_ 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_WALLET_FORM_FIELD_ERROR_H_
6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_FORM_FIELD_ERROR_H_ 6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_FORM_FIELD_ERROR_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "components/autofill/core/browser/field_types.h" 9 #include "components/autofill/core/browser/field_types.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // legal address form. 52 // legal address form.
53 LEGAL_ADDRESS, 53 LEGAL_ADDRESS,
54 }; 54 };
55 55
56 FormFieldError(ErrorType error_type, Location location); 56 FormFieldError(ErrorType error_type, Location location);
57 ~FormFieldError(); 57 ~FormFieldError();
58 58
59 ErrorType error_type() const { return error_type_; } 59 ErrorType error_type() const { return error_type_; }
60 Location location() const { return location_; } 60 Location location() const { return location_; }
61 61
62 // Gets the appropriate AutofillFieldType for |location| and |error_type|. 62 // Gets the appropriate field type for |location| and |error_type|.
63 AutofillFieldType GetAutofillType() const; 63 ServerFieldType GetAutofillType() const;
64 64
65 // Gets a user facing error message appropriate for |location| and 65 // Gets a user facing error message appropriate for |location| and
66 // |error_type|. 66 // |error_type|.
67 base::string16 GetErrorMessage() const; 67 base::string16 GetErrorMessage() const;
68 68
69 // Creates an instance of FormFieldError from the input dictionary. 69 // Creates an instance of FormFieldError from the input dictionary.
70 static FormFieldError CreateFormFieldError( 70 static FormFieldError CreateFormFieldError(
71 const base::DictionaryValue& dictionary); 71 const base::DictionaryValue& dictionary);
72 72
73 bool operator==(const FormFieldError& other) const; 73 bool operator==(const FormFieldError& other) const;
74 74
75 private: 75 private:
76 // The type of error as defined by the Wallet server. 76 // The type of error as defined by the Wallet server.
77 ErrorType error_type_; 77 ErrorType error_type_;
78 78
79 // The location of the error as defined by the Wallet server. 79 // The location of the error as defined by the Wallet server.
80 Location location_; 80 Location location_;
81 81
82 // This class is intentionally copyable and assignable. 82 // This class is intentionally copyable and assignable.
83 }; 83 };
84 84
85 } // namespace wallet 85 } // namespace wallet
86 } // namespace autofill 86 } // namespace autofill
87 87
88 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_FORM_FIELD_ERROR_H_ 88 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_FORM_FIELD_ERROR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698