| Index: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLogger.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLogger.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLogger.java
|
| index 5a000d8ede43c58854518a2a7ece8cb6655c0f7b..7668152b3e0c8440857fcb050fcbb0be451e2d17 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLogger.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLogger.java
|
| @@ -4,6 +4,8 @@
|
|
|
| package org.chromium.chrome.browser.contextualsearch;
|
|
|
| +import java.net.URL;
|
| +
|
| /**
|
| * An interface for logging to UMA via Ranker.
|
| */
|
| @@ -27,21 +29,31 @@ public interface ContextualSearchRankerLogger {
|
| }
|
|
|
| /**
|
| - * Logs a particular key/value pair.
|
| + * Sets up logging for the page with the given URL.
|
| + * This method must be called before calling {@link #log} or {@link #logOutcome}.
|
| + * @param basePageUrl The URL of the base page to log with Ranker.
|
| + */
|
| + void setupLoggingForPage(URL basePageUrl);
|
| +
|
| + /**
|
| + * Logs a particular feature at inference time as a key/value pair.
|
| * @param feature The feature to log.
|
| * @param value The value to log, which is associated with the given key.
|
| */
|
| void log(Feature feature, Object value);
|
|
|
| /**
|
| - * Logs the final outcome value that indicates the ML label.
|
| + * Logs an outcome value at training time that indicates an ML label as a key/value pair.
|
| + * @param feature The feature to log.
|
| * @param value The outcome label value.
|
| */
|
| - void logOutcome(Object value);
|
| + void logOutcome(Feature feature, Object value);
|
|
|
| /**
|
| * Writes all the accumulated log entries and resets the logger so that future log calls
|
| * accumulate into a new record.
|
| + * After calling this method another call to {@link #setupLoggingForPage} is required before
|
| + * additional {@link #log} or {@link #logOutcome} calls.
|
| */
|
| void writeLogAndReset();
|
| }
|
|
|