Commit b6fc1e44 authored by sandromaggi's avatar sandromaggi Committed by Commit Bot

[Autofill Assistant] Expand error logging

Add error statements for all "false" returns in CreateOptionsFromProto
to enable easier debugging when the action fails.

Bug: none
Change-Id: I3dfd353706ab7da0b4ad956fb57b86d62ba263ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2029512
Commit-Queue: Sandro Maggi <sandromaggi@google.com>
Reviewed-by: default avatarClemens Arbesser <arbesser@google.com>
Cr-Commit-Position: refs/heads/master@{#737288}
parent aa7bc2f2
......@@ -9,6 +9,7 @@
#include <set>
#include <utility>
#include <vector>
#include "base/bind.h"
#include "base/callback.h"
#include "base/i18n/case_conversion.h"
......@@ -691,12 +692,14 @@ bool CollectUserDataAction::CreateOptionsFromProto() {
collect_user_data.billing_postal_code_missing_text();
if (collect_user_data_options_->require_billing_postal_code &&
collect_user_data_options_->billing_postal_code_missing_text.empty()) {
VLOG(1) << "Required postal code without error text";
return false;
}
collect_user_data_options_->billing_address_name =
collect_user_data.billing_address_name();
if (collect_user_data_options_->request_payment_method &&
collect_user_data_options_->billing_address_name.empty()) {
VLOG(1) << "Required payment method without address name";
return false;
}
......@@ -828,6 +831,7 @@ bool CollectUserDataAction::CreateOptionsFromProto() {
collect_user_data.show_terms_as_checkbox();
if (collect_user_data.accept_terms_and_conditions_text().empty()) {
VLOG(1) << "Required terms and conditions without text";
return false;
}
collect_user_data_options_->accept_terms_and_conditions_text =
......@@ -835,6 +839,7 @@ bool CollectUserDataAction::CreateOptionsFromProto() {
if (!collect_user_data.show_terms_as_checkbox() &&
collect_user_data.terms_require_review_text().empty()) {
VLOG(1) << "Required terms review without text";
return false;
}
collect_user_data_options_->terms_require_review_text =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment