-
Donn Denman authored
Adds support for persisting and later reporting user interaction to the server in support of the offline sanitized click-log. BACKGROUND: This change allows the server to log outcomes from interactions and associate them with the privacy-safe documents in the Search Index. See go/cs-sanitized for more details on this design. DESIGN OVERVIEW: When the server recognizes a document it generates a random EventID and logs it to sawmill and returns it to the client in the response to the Resolve request. The client passes the EventID up to Java and persists it in local device storage along with the user-interaction outcomes. The next time the user makes a Resolve request the client checks for previous data, and if present it sends it as part of the Context to the server (and erases it from storage). DETAILS: This CL introduces a new interface ContextualSearchInteractionPersister to persist user interactions, and an implementation that uses local storage. The manager detects a new parameter for the EventID returned in the Resolve request. It stores this and an encoded set of bits that describe the user-interaction for that event in local storage. Any subsequent Resolve request checks for a previous EventID and when non-zero sends it along with the user-interaction results in CGI params to the server. Support for these params on the client and server have already landed. If the server never sends an Event ID to log, then the client won't change it's behavior. The server does not yet send these Event IDs. BUG=872902 Change-Id: Ief9a95625b16a4b0a3be5325ed1adadff9c791b9 Reviewed-on: https://chromium-review.googlesource.com/c/1170352 Commit-Queue: Donn Denman <donnd@chromium.org> Reviewed-by:
Brian White <bcwhite@chromium.org> Reviewed-by:
Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#622993}
c845b226