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

Unified Diff: third_party/libaddressinput/chromium/addressinput_util.h

Issue 368243007: Reland of "Use address_data.h from upstream libaddressinput". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update BUILD.gn, fix a test. Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libaddressinput/BUILD.gn ('k') | third_party/libaddressinput/chromium/addressinput_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libaddressinput/chromium/addressinput_util.h
diff --git a/third_party/libaddressinput/chromium/addressinput_util.h b/third_party/libaddressinput/chromium/addressinput_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..e3bdaa4cc7c91a14cb6dc2bc69dcfc6ceb46fb66
--- /dev/null
+++ b/third_party/libaddressinput/chromium/addressinput_util.h
@@ -0,0 +1,42 @@
+// Copyright 2014 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.
+
+#ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_ADDRESSINPUT_UTIL_H_
+#define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_ADDRESSINPUT_UTIL_H_
+
+#include <map>
+
+#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_field.h"
+#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_problem.h"
+
+namespace i18n {
+namespace addressinput {
+struct AddressData;
+}
+}
+
+namespace autofill {
+namespace addressinput {
+
+// Returns true if |address_to_check| has all of its required fields.
+bool HasAllRequiredFields(
+ const ::i18n::addressinput::AddressData& address_to_check);
+
+// Validates required fields in |address_to_check| without loading rules from
+// the server. The |problems| parameter cannot be NULL. Does not take ownership
+// of its parameters.
+//
+// See documentation of ::i18n::addressinput::AddressValidator::Validate() for
+// description of |filter| and |problems|.
+void ValidateRequiredFields(
+ const ::i18n::addressinput::AddressData& address_to_check,
+ const std::multimap< ::i18n::addressinput::AddressField,
+ ::i18n::addressinput::AddressProblem::Type>* filter,
+ std::multimap< ::i18n::addressinput::AddressField,
+ ::i18n::addressinput::AddressProblem::Type>* problems);
+
+} // namespace addressinput
+} // namespace autofill
+
+#endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_ADDRESSINPUT_UTIL_H_
« no previous file with comments | « third_party/libaddressinput/BUILD.gn ('k') | third_party/libaddressinput/chromium/addressinput_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698