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

Side by Side Diff: components/autofill/core/browser/address_field.h

Issue 1859453002: components/autofill: scoped_ptr -> unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 4 years, 8 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
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_CORE_BROWSER_ADDRESS_FIELD_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_FIELD_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_FIELD_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_FIELD_H_
7 7
8 #include <memory>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "components/autofill/core/browser/autofill_type.h" 15 #include "components/autofill/core/browser/autofill_type.h"
16 #include "components/autofill/core/browser/form_field.h" 16 #include "components/autofill/core/browser/form_field.h"
17 17
18 namespace autofill { 18 namespace autofill {
19 19
20 class AutofillField; 20 class AutofillField;
21 class AutofillScanner; 21 class AutofillScanner;
22 22
23 class AddressField : public FormField { 23 class AddressField : public FormField {
24 public: 24 public:
25 static scoped_ptr<FormField> Parse(AutofillScanner* scanner); 25 static std::unique_ptr<FormField> Parse(AutofillScanner* scanner);
26 26
27 protected: 27 protected:
28 void AddClassifications(FieldCandidatesMap* field_candidates) const override; 28 void AddClassifications(FieldCandidatesMap* field_candidates) const override;
29 29
30 private: 30 private:
31 // When parsing a field's label and name separately with a given pattern: 31 // When parsing a field's label and name separately with a given pattern:
32 enum ParseNameLabelResult { 32 enum ParseNameLabelResult {
33 RESULT_MATCH_NONE, // No match with the label or name. 33 RESULT_MATCH_NONE, // No match with the label or name.
34 RESULT_MATCH_LABEL, // Only the label matches the pattern. 34 RESULT_MATCH_LABEL, // Only the label matches the pattern.
35 RESULT_MATCH_NAME, // Only the name matches the pattern. 35 RESULT_MATCH_NAME, // Only the name matches the pattern.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 AutofillField* zip_; 93 AutofillField* zip_;
94 AutofillField* zip4_; // optional ZIP+4; we don't fill this yet. 94 AutofillField* zip4_; // optional ZIP+4; we don't fill this yet.
95 AutofillField* country_; 95 AutofillField* country_;
96 96
97 DISALLOW_COPY_AND_ASSIGN(AddressField); 97 DISALLOW_COPY_AND_ASSIGN(AddressField);
98 }; 98 };
99 99
100 } // namespace autofill 100 } // namespace autofill
101 101
102 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_FIELD_H_ 102 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_ADDRESS_FIELD_H_
OLDNEW
« no previous file with comments | « components/autofill/content/renderer/password_generation_agent.cc ('k') | components/autofill/core/browser/address_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698