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

Side by Side Diff: third_party/libaddressinput/chromium/addressinput_util.cc

Issue 490373002: Add back organization field for autofill settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Git migration. Created 6 years, 3 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
« no previous file with comments | « third_party/libaddressinput/README.chromium ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "third_party/libaddressinput/chromium/addressinput_util.h" 5 #include "third_party/libaddressinput/chromium/addressinput_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 DCHECK(problems); 50 DCHECK(problems);
51 51
52 static const AddressField kFields[] = { 52 static const AddressField kFields[] = {
53 ::i18n::addressinput::COUNTRY, 53 ::i18n::addressinput::COUNTRY,
54 ::i18n::addressinput::ADMIN_AREA, 54 ::i18n::addressinput::ADMIN_AREA,
55 ::i18n::addressinput::LOCALITY, 55 ::i18n::addressinput::LOCALITY,
56 ::i18n::addressinput::DEPENDENT_LOCALITY, 56 ::i18n::addressinput::DEPENDENT_LOCALITY,
57 ::i18n::addressinput::SORTING_CODE, 57 ::i18n::addressinput::SORTING_CODE,
58 ::i18n::addressinput::POSTAL_CODE, 58 ::i18n::addressinput::POSTAL_CODE,
59 ::i18n::addressinput::STREET_ADDRESS, 59 ::i18n::addressinput::STREET_ADDRESS,
60 ::i18n::addressinput::RECIPIENT}; 60 // ORGANIZATION is never required.
61 ::i18n::addressinput::RECIPIENT
62 };
61 63
62 for (size_t i = 0; i < arraysize(kFields); ++i) { 64 for (size_t i = 0; i < arraysize(kFields); ++i) {
63 AddressField field = kFields[i]; 65 AddressField field = kFields[i];
64 if (address_to_check.IsFieldEmpty(field) && 66 if (address_to_check.IsFieldEmpty(field) &&
65 IsFieldRequired(field, address_to_check.region_code) && 67 IsFieldRequired(field, address_to_check.region_code) &&
66 !FilterExcludes(filter, field, MISSING_REQUIRED_FIELD)) { 68 !FilterExcludes(filter, field, MISSING_REQUIRED_FIELD)) {
67 problems->insert(std::make_pair(field, MISSING_REQUIRED_FIELD)); 69 problems->insert(std::make_pair(field, MISSING_REQUIRED_FIELD));
68 } 70 }
69 } 71 }
70 } 72 }
71 73
72 } // namespace addressinput 74 } // namespace addressinput
73 } // namespace autofill 75 } // namespace autofill
OLDNEW
« no previous file with comments | « third_party/libaddressinput/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698