Commit b041d01c authored by Clemens Arbesser's avatar Clemens Arbesser Committed by Commit Bot

[Autofill Assistant] Send missing flag to backend.

This will let the backend know whether the UI was shown to the user or
not.

Change-Id: I836fba76d322fc5989919323ccb4a50947a498e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2056545
Commit-Queue: Clemens Arbesser <arbesser@google.com>
Commit-Queue: Sandro Maggi <sandromaggi@google.com>
Auto-Submit: Clemens Arbesser <arbesser@google.com>
Reviewed-by: default avatarSandro Maggi <sandromaggi@google.com>
Cr-Commit-Position: refs/heads/master@{#741400}
parent 38e5a996
...@@ -718,6 +718,8 @@ void CollectUserDataAction::OnGetUserData( ...@@ -718,6 +718,8 @@ void CollectUserDataAction::OnGetUserData(
processed_action_proto_->mutable_collect_user_data_result() processed_action_proto_->mutable_collect_user_data_result()
->mutable_model()); ->mutable_model());
} }
processed_action_proto_->mutable_collect_user_data_result()
->set_shown_to_user(shown_to_user_);
} }
EndAction(succeed ? ClientStatus(ACTION_APPLIED) EndAction(succeed ? ClientStatus(ACTION_APPLIED)
......
...@@ -303,7 +303,10 @@ TEST_F(CollectUserDataActionTest, SelectLogin) { ...@@ -303,7 +303,10 @@ TEST_F(CollectUserDataActionTest, SelectLogin) {
Property(&ProcessedActionProto::status, ACTION_APPLIED), Property(&ProcessedActionProto::status, ACTION_APPLIED),
Property(&ProcessedActionProto::collect_user_data_result, Property(&ProcessedActionProto::collect_user_data_result,
Property(&CollectUserDataResultProto::login_payload, Property(&CollectUserDataResultProto::login_payload,
"payload")))))); "payload")),
Property(&ProcessedActionProto::collect_user_data_result,
Property(&CollectUserDataResultProto::shown_to_user,
true))))));
CollectUserDataAction action(&mock_action_delegate_, action_proto); CollectUserDataAction action(&mock_action_delegate_, action_proto);
action.ProcessAction(callback_.Get()); action.ProcessAction(callback_.Get());
} }
...@@ -331,7 +334,10 @@ TEST_F(CollectUserDataActionTest, LoginChoiceAutomaticIfNoOtherOptions) { ...@@ -331,7 +334,10 @@ TEST_F(CollectUserDataActionTest, LoginChoiceAutomaticIfNoOtherOptions) {
Property(&ProcessedActionProto::status, ACTION_APPLIED), Property(&ProcessedActionProto::status, ACTION_APPLIED),
Property(&ProcessedActionProto::collect_user_data_result, Property(&ProcessedActionProto::collect_user_data_result,
Property(&CollectUserDataResultProto::login_payload, Property(&CollectUserDataResultProto::login_payload,
"guest")))))); "guest")),
Property(&ProcessedActionProto::collect_user_data_result,
Property(&CollectUserDataResultProto::shown_to_user,
false))))));
CollectUserDataAction action(&mock_action_delegate_, action_proto); CollectUserDataAction action(&mock_action_delegate_, action_proto);
action.ProcessAction(callback_.Get()); action.ProcessAction(callback_.Get());
} }
......
...@@ -534,6 +534,9 @@ message CollectUserDataResultProto { ...@@ -534,6 +534,9 @@ message CollectUserDataResultProto {
optional int32 date_range_end_timeslot = 14; optional int32 date_range_end_timeslot = 14;
// The values obtained from the additional sections. // The values obtained from the additional sections.
repeated ModelProto.ModelValue additional_sections_values = 15; repeated ModelProto.ModelValue additional_sections_values = 15;
// Indicates whether the UI was shown to the user. This can be false if
// only the login section was requested and the choice was implicitly made.
optional bool shown_to_user = 16;
reserved 7, 8; reserved 7, 8;
} }
......
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