Commit 3adbd43b authored by Donn Denman's avatar Donn Denman Committed by Commit Bot

Revert "[TTS] Write snippet to UKM for offline development"

This reverts commit 0036bbd0.

Reason for revert: Ran out of time to try the development pipeline

DETAILS: Just whitespace changes from the original.

Original change's description:
> [TTS] Write snippet to UKM for offline development
>
> Writes a snippet-hash and doc-id to UKM iff a command-line flag is
> set that allows this development-only data to be logged. Disabled
> on Beta and Stable channels.
>
> See go/ukm-cs-5, go/ukm-dev-data, go/cs-sanitized for details.
>
> Unfortunately our ContextualSearchDelegate cannot decode a JSON 64bit value
> so we now expect to receive these new data in string format.
>
> Also fix a bug in the existing Ranker code: the native logger cannot log
> 64-bit values, so we rename some misleading methods.  Also, we need to break
> these new data up into high/low 32-bit values when we log to Ranker.
>
> BUG=894568, 872902
>
> Change-Id: Id0dd3ac218bafeb23396f010c340e5e5531799f0
> Reviewed-on: https://chromium-review.googlesource.com/c/1264591
> Reviewed-by: Robert Kaplow (sloooow) <rkaplow@chromium.org>
> Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
> Reviewed-by: Theresa <twellington@chromium.org>
> Reviewed-by: Andrew Moylan <amoylan@chromium.org>
> Commit-Queue: Donn Denman <donnd@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#599258}

TBR=rkaplow@chromium.org,donnd@chromium.org,twellington@chromium.org,amoylan@chromium.org,rhalavati@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 894568, 872902
Change-Id: I99cc44bf1f89cace8548957e75acbcdd2cfe9afa
Reviewed-on: https://chromium-review.googlesource.com/c/1308102
Commit-Queue: Donn Denman <donnd@chromium.org>
Reviewed-by: default avatarDonn Denman <donnd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604161}
parent 56e59f79
...@@ -72,9 +72,6 @@ public interface ContextualSearchInteractionRecorder { ...@@ -72,9 +72,6 @@ public interface ContextualSearchInteractionRecorder {
int QUICK_ACTION_IMPRESSIONS_COUNT = 29; int QUICK_ACTION_IMPRESSIONS_COUNT = 29;
int QUICK_ACTIONS_TAKEN_COUNT = 30; int QUICK_ACTIONS_TAKEN_COUNT = 30;
int QUICK_ACTIONS_IGNORED_COUNT = 31; int QUICK_ACTIONS_IGNORED_COUNT = 31;
// UKM CS v5 features (see go/ukm-cs-5, go/ukm-dev-data).
int OUTCOME_DOC_ID = 32;
int OUTCOME_SNIPPET_HASH = 33;
} }
/** /**
...@@ -137,15 +134,4 @@ public interface ContextualSearchInteractionRecorder { ...@@ -137,15 +134,4 @@ public interface ContextualSearchInteractionRecorder {
* additional {@link #logFeature} or {@link #logOutcome} calls. * additional {@link #logFeature} or {@link #logOutcome} calls.
*/ */
void writeLogAndReset(); void writeLogAndReset();
/**
* Records data about the user-viewed document and the associated document in the Search Index
* obtained from the server. This data is for development purposes only, and may contain
* encrypted PII.
* TODO(donnd): remove before the next release. See https://crbug.com/894568 for details.
*
* @param docId The canonical doc ID for this document when located in the Search Index, or 0.
* @param snippetHash The hash of a section of text near the word that the user tapped, or 0.
*/
void recordSnippetData(long docId, long snippetHash);
} }
...@@ -679,21 +679,17 @@ public class ContextualSearchManager ...@@ -679,21 +679,17 @@ public class ContextualSearchManager
* @param caption The caption to display. * @param caption The caption to display.
* @param quickActionUri The URI for the intent associated with the quick action. * @param quickActionUri The URI for the intent associated with the quick action.
* @param quickActionCategory The {@link QuickActionCategory} for the quick action. * @param quickActionCategory The {@link QuickActionCategory} for the quick action.
* @param docId The ID of the document identified by the server, or 0 for not known.
* @param snippetHash The hash of a snippet from the surrounding text, as identified by the
* server, or 0 for not known.
*/ */
@CalledByNative @CalledByNative
public void onSearchTermResolutionResponse(boolean isNetworkUnavailable, int responseCode, public void onSearchTermResolutionResponse(boolean isNetworkUnavailable, int responseCode,
final String searchTerm, final String displayText, final String alternateTerm, final String searchTerm, final String displayText, final String alternateTerm,
final String mid, boolean doPreventPreload, int selectionStartAdjust, final String mid, boolean doPreventPreload, int selectionStartAdjust,
int selectionEndAdjust, final String contextLanguage, final String thumbnailUrl, int selectionEndAdjust, final String contextLanguage, final String thumbnailUrl,
final String caption, final String quickActionUri, final int quickActionCategory, final String caption, final String quickActionUri, final int quickActionCategory) {
final long docId, final long snippetHash) {
mNetworkCommunicator.handleSearchTermResolutionResponse(isNetworkUnavailable, responseCode, mNetworkCommunicator.handleSearchTermResolutionResponse(isNetworkUnavailable, responseCode,
searchTerm, displayText, alternateTerm, mid, doPreventPreload, selectionStartAdjust, searchTerm, displayText, alternateTerm, mid, doPreventPreload, selectionStartAdjust,
selectionEndAdjust, contextLanguage, thumbnailUrl, caption, quickActionUri, selectionEndAdjust, contextLanguage, thumbnailUrl, caption, quickActionUri,
quickActionCategory, docId, snippetHash); quickActionCategory);
} }
@Override @Override
...@@ -701,7 +697,7 @@ public class ContextualSearchManager ...@@ -701,7 +697,7 @@ public class ContextualSearchManager
String searchTerm, String displayText, String alternateTerm, String mid, String searchTerm, String displayText, String alternateTerm, String mid,
boolean doPreventPreload, int selectionStartAdjust, int selectionEndAdjust, boolean doPreventPreload, int selectionStartAdjust, int selectionEndAdjust,
String contextLanguage, String thumbnailUrl, String caption, String quickActionUri, String contextLanguage, String thumbnailUrl, String caption, String quickActionUri,
int quickActionCategory, long docId, long snippetHash) { int quickActionCategory) {
if (!mInternalStateController.isStillWorkingOn(InternalState.RESOLVING)) return; if (!mInternalStateController.isStillWorkingOn(InternalState.RESOLVING)) return;
// Show an appropriate message for what to search for. // Show an appropriate message for what to search for.
...@@ -793,10 +789,6 @@ public class ContextualSearchManager ...@@ -793,10 +789,6 @@ public class ContextualSearchManager
} }
} }
// Tell the interaction recorder about the docId and snippetHash, so we can correlate the
// signals and outcomes with this crawled document (when available).
mTapSuppressionInteractionRecorder.recordSnippetData(docId, snippetHash);
mInternalStateController.notifyFinishedWorkOn(InternalState.RESOLVING); mInternalStateController.notifyFinishedWorkOn(InternalState.RESOLVING);
} }
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
package org.chromium.chrome.browser.contextualsearch; package org.chromium.chrome.browser.contextualsearch;
import android.support.annotation.Nullable;
import java.net.URL; import java.net.URL;
import javax.annotation.Nullable;
/** /**
* An interface for network communication between the Contextual Search client and server. * An interface for network communication between the Contextual Search client and server.
*/ */
...@@ -39,15 +39,12 @@ public interface ContextualSearchNetworkCommunicator { ...@@ -39,15 +39,12 @@ public interface ContextualSearchNetworkCommunicator {
* @param caption The caption to display. * @param caption The caption to display.
* @param quickActionUri The URI for the intent associated with the quick action. * @param quickActionUri The URI for the intent associated with the quick action.
* @param quickActionCategory The {@link QuickActionCategory} for the quick action. * @param quickActionCategory The {@link QuickActionCategory} for the quick action.
* @param docId The ID of the document identified by the server, or 0 for not known.
* @param snippetHash The hash of a snippet from the surrounding text, as identified by the
* server, or 0 for not known.
*/ */
void handleSearchTermResolutionResponse(boolean isNetworkUnavailable, int responseCode, void handleSearchTermResolutionResponse(boolean isNetworkUnavailable, int responseCode,
String searchTerm, String displayText, String alternateTerm, String mid, String searchTerm, String displayText, String alternateTerm, String mid,
boolean doPreventPreload, int selectionStartAdjust, int selectionEndAdjust, boolean doPreventPreload, int selectionStartAdjust, int selectionEndAdjust,
String contextLanguage, String thumbnailUrl, String caption, String quickActionUri, String contextLanguage, String thumbnailUrl, String caption, String quickActionUri,
int quickActionCategory, long docId, long snippetHash); int quickActionCategory);
/** /**
* @return Whether the device is currently online. * @return Whether the device is currently online.
......
...@@ -6,10 +6,8 @@ package org.chromium.chrome.browser.contextualsearch; ...@@ -6,10 +6,8 @@ package org.chromium.chrome.browser.contextualsearch;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import org.chromium.base.CommandLine;
import org.chromium.base.Log; import org.chromium.base.Log;
import org.chromium.base.VisibleForTesting; import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.browser.ChromeVersionInfo;
import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.WebContents;
import java.util.Collections; import java.util.Collections;
...@@ -22,13 +20,6 @@ import java.util.Map; ...@@ -22,13 +20,6 @@ import java.util.Map;
public class ContextualSearchRankerLoggerImpl implements ContextualSearchInteractionRecorder { public class ContextualSearchRankerLoggerImpl implements ContextualSearchInteractionRecorder {
private static final String TAG = "ContextualSearch"; private static final String TAG = "ContextualSearch";
@VisibleForTesting
static final String UKM_DEV_DATA_TTS_ENABLE = "ukm-dev-data-tts-enable";
// These names are appended to the ones in the maps below.
// TODO(donnd): remove before the next release. See https://crbug.com/894568 for details.
private static final String LOW_BITS = "LowBits";
private static final String HIGH_BITS = "HighBits";
// Names for all our features and labels. // Names for all our features and labels.
// Integer values should contain @Feature values only. // Integer values should contain @Feature values only.
private static final Map<Integer, String> ALL_NAMES; private static final Map<Integer, String> ALL_NAMES;
...@@ -46,9 +37,6 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac ...@@ -46,9 +37,6 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac
outcomes.put(Feature.OUTCOME_WAS_QUICK_ANSWER_SEEN, "OutcomeWasQuickAnswerSeen"); outcomes.put(Feature.OUTCOME_WAS_QUICK_ANSWER_SEEN, "OutcomeWasQuickAnswerSeen");
// UKM CS v2 outcomes. // UKM CS v2 outcomes.
outcomes.put(Feature.OUTCOME_WAS_CARDS_DATA_SHOWN, "OutcomeWasCardsDataShown"); outcomes.put(Feature.OUTCOME_WAS_CARDS_DATA_SHOWN, "OutcomeWasCardsDataShown");
// UKM CS v5 features are technically outcomes, since they are logged after inference.
outcomes.put(Feature.OUTCOME_DOC_ID, "OutcomeDocId");
outcomes.put(Feature.OUTCOME_SNIPPET_HASH, "OutcomeSnippetHash");
OUTCOMES = Collections.unmodifiableMap(outcomes); OUTCOMES = Collections.unmodifiableMap(outcomes);
// NOTE: this list needs to be kept in sync with the white list in // NOTE: this list needs to be kept in sync with the white list in
...@@ -120,12 +108,6 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac ...@@ -120,12 +108,6 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac
private Map<Integer, Object> mFeaturesLoggedForTesting; private Map<Integer, Object> mFeaturesLoggedForTesting;
private Map<Integer, Object> mOutcomesLoggedForTesting; private Map<Integer, Object> mOutcomesLoggedForTesting;
// Development-only data for this release. Records encoded data from the server about the text
// tapped, which may contain PII, and the search index document ID.
// TODO(donnd): remove before the next release. See https://crbug.com/894568 for details.
private long mDocId;
private long mSnippetHash;
/** /**
* Constructs a Ranker Logger and associated native implementation to write Contextual Search * Constructs a Ranker Logger and associated native implementation to write Contextual Search
* ML data to Ranker. * ML data to Ranker.
...@@ -212,8 +194,6 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac ...@@ -212,8 +194,6 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac
mFeaturesToLog = null; mFeaturesToLog = null;
mBasePageWebContents = null; mBasePageWebContents = null;
mAssistRankerPrediction = AssistRankerPrediction.UNDETERMINED; mAssistRankerPrediction = AssistRankerPrediction.UNDETERMINED;
mDocId = 0;
mSnippetHash = 0;
} }
@Override @Override
...@@ -223,7 +203,6 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac ...@@ -223,7 +203,6 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac
&& !mFeaturesToLog.isEmpty()) { && !mFeaturesToLog.isEmpty()) {
assert mIsLoggingReadyForPage; assert mIsLoggingReadyForPage;
assert mHasInferenceOccurred; assert mHasInferenceOccurred;
logDevelopmentOutcomes();
// Only the outcomes will be present, since we logged inference features at // Only the outcomes will be present, since we logged inference features at
// inference time. // inference time.
for (Map.Entry<Integer, Object> entry : mFeaturesToLog.entrySet()) { for (Map.Entry<Integer, Object> entry : mFeaturesToLog.entrySet()) {
...@@ -237,34 +216,6 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac ...@@ -237,34 +216,6 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac
reset(); reset();
} }
@Override
public void recordSnippetData(long docId, long snippetHash) {
if (!canRecordSensitiveDataToUkm()) return;
mDocId = docId;
mSnippetHash = snippetHash;
}
/**
* @return Whether we can record sensitive data to UKM on this channel due to an enabled
* command-line-flag.
*/
private boolean canRecordSensitiveDataToUkm() {
if (!CommandLine.getInstance().hasSwitch(UKM_DEV_DATA_TTS_ENABLE)) return false;
if (ChromeVersionInfo.isBetaBuild() || ChromeVersionInfo.isStableBuild()) return false;
return true;
}
/** Writes our development-only outcome data. */
private void logDevelopmentOutcomes() {
if (!canRecordSensitiveDataToUkm() || mDocId == 0 || mSnippetHash == 0) return;
logInternal(Feature.OUTCOME_DOC_ID, mDocId);
logInternal(Feature.OUTCOME_SNIPPET_HASH, mSnippetHash);
}
/** /**
* Logs the given feature/value to the internal map that accumulates an entire record (which can * Logs the given feature/value to the internal map that accumulates an entire record (which can
* be logged by calling writeLogAndReset). * be logged by calling writeLogAndReset).
...@@ -291,9 +242,9 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac ...@@ -291,9 +242,9 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac
if (value instanceof Boolean) { if (value instanceof Boolean) {
logToNative(feature, ((boolean) value ? 1 : 0)); logToNative(feature, ((boolean) value ? 1 : 0));
} else if (value instanceof Integer) { } else if (value instanceof Integer) {
logToNative(feature, (int) value); logToNative(feature, Long.valueOf((int) value));
} else if (value instanceof Long) { } else if (value instanceof Long) {
logLong(feature, (long) value); logToNative(feature, (long) value);
} else if (value instanceof Character) { } else if (value instanceof Character) {
logToNative(feature, Character.getNumericValue((char) value)); logToNative(feature, Character.getNumericValue((char) value));
} else { } else {
...@@ -308,34 +259,10 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac ...@@ -308,34 +259,10 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac
* @param feature The feature to log. * @param feature The feature to log.
* @param value The value to log. * @param value The value to log.
*/ */
private void logToNative(@Feature int feature, int value) { private void logToNative(@Feature int feature, long value) {
String featureName = getFeatureName(feature); String featureName = getFeatureName(feature);
assert featureName != null : "No Name for feature " + feature; assert featureName != null : "No Name for feature " + feature;
nativeLogInt32(mNativePointer, featureName, value); nativeLogLong(mNativePointer, featureName, value);
}
/**
* Logs a {@code Long} value as two separate int32 values, appending to the name to indicate
* whether the logged value is the high bits or the low bits.
*
* @param feature The {@code Feature} to log. We'll mangle it's name when logging.
* @param longValue The {@code Long} value to break up into two ints.
*/
private void logLong(@Feature int feature, long longValue) {
String featureName = getFeatureName(feature);
nativeLogInt32(mNativePointer, featureName + HIGH_BITS, getHighBits(longValue));
nativeLogInt32(mNativePointer, featureName + LOW_BITS, getLowBits(longValue));
}
/** @return the high bits of the given long value as an int32. */
private int getHighBits(long longValue) {
return (int) (longValue >> 32);
}
/** @return the low bits of the given long value as an int32. */
private int getLowBits(long longValue) {
// Bitwise AND with the max integer just gets us whatever fits in that int.
return (int) longValue & Integer.MAX_VALUE;
} }
/** /**
...@@ -372,8 +299,8 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac ...@@ -372,8 +299,8 @@ public class ContextualSearchRankerLoggerImpl implements ContextualSearchInterac
// ============================================================================================ // ============================================================================================
private native long nativeInit(); private native long nativeInit();
private native void nativeDestroy(long nativeContextualSearchRankerLoggerImpl); private native void nativeDestroy(long nativeContextualSearchRankerLoggerImpl);
private native void nativeLogInt32( private native void nativeLogLong(
long nativeContextualSearchRankerLoggerImpl, String featureString, int value); long nativeContextualSearchRankerLoggerImpl, String featureString, long value);
private native void nativeSetupLoggingAndRanker( private native void nativeSetupLoggingAndRanker(
long nativeContextualSearchRankerLoggerImpl, WebContents basePageWebContents); long nativeContextualSearchRankerLoggerImpl, WebContents basePageWebContents);
// Returns an AssistRankerPrediction integer value. // Returns an AssistRankerPrediction integer value.
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
package org.chromium.chrome.browser.contextualsearch; package org.chromium.chrome.browser.contextualsearch;
import android.net.Uri; import android.net.Uri;
import android.support.annotation.Nullable;
import org.chromium.base.VisibleForTesting; import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.browser.ChromeActivity; import org.chromium.chrome.browser.ChromeActivity;
...@@ -23,6 +22,8 @@ import java.util.HashMap; ...@@ -23,6 +22,8 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import javax.annotation.Nullable;
/** /**
* Implements a fake Contextual Search server, for testing purposes. * Implements a fake Contextual Search server, for testing purposes.
* TODO(donnd): add more functionality to this class once the overall approach has been validated. * TODO(donnd): add more functionality to this class once the overall approach has been validated.
...@@ -32,8 +33,6 @@ import java.util.concurrent.TimeoutException; ...@@ -32,8 +33,6 @@ import java.util.concurrent.TimeoutException;
@VisibleForTesting @VisibleForTesting
class ContextualSearchFakeServer class ContextualSearchFakeServer
implements ContextualSearchNetworkCommunicator, OverlayPanelContentFactory { implements ContextualSearchNetworkCommunicator, OverlayPanelContentFactory {
static final long ARBITRARY_DOC_ID = -12345678901234l;
static final long ARBITRARY_SNIPPET_HASH = 12345678901234567l;
private final ContextualSearchPolicy mPolicy; private final ContextualSearchPolicy mPolicy;
...@@ -183,8 +182,6 @@ class ContextualSearchFakeServer ...@@ -183,8 +182,6 @@ class ContextualSearchFakeServer
private final String mCaption; private final String mCaption;
private final String mQuickActionUri; private final String mQuickActionUri;
private final int mQuickActionCategory; private final int mQuickActionCategory;
private final long mDocId;
private final long mSnippetHash;
boolean mDidStartResolution; boolean mDidStartResolution;
boolean mDidFinishResolution; boolean mDidFinishResolution;
...@@ -205,14 +202,12 @@ class ContextualSearchFakeServer ...@@ -205,14 +202,12 @@ class ContextualSearchFakeServer
* @param caption The caption to display. * @param caption The caption to display.
* @param quickActionUri The URI for the intent associated with the quick action. * @param quickActionUri The URI for the intent associated with the quick action.
* @param quickActionCategory The category for the quick action. * @param quickActionCategory The category for the quick action.
* @param docId A document ID from the Search crawl.
* @param snippetHash A long hash of some characters tapped.
*/ */
FakeTapSearch(String nodeId, boolean isNetworkUnavailable, int responseCode, FakeTapSearch(String nodeId, boolean isNetworkUnavailable, int responseCode,
String searchTerm, String displayText, String alternateTerm, String mid, String searchTerm, String displayText, String alternateTerm, String mid,
boolean doPreventPreload, int startAdjust, int endAdjust, String contextLanguage, boolean doPreventPreload, int startAdjust, int endAdjust, String contextLanguage,
String thumbnailUrl, String caption, String quickActionUri, int quickActionCategory, String thumbnailUrl, String caption, String quickActionUri,
long docId, long snippetHash) { int quickActionCategory) {
super(nodeId); super(nodeId);
mIsNetworkUnavailable = isNetworkUnavailable; mIsNetworkUnavailable = isNetworkUnavailable;
...@@ -229,8 +224,6 @@ class ContextualSearchFakeServer ...@@ -229,8 +224,6 @@ class ContextualSearchFakeServer
mCaption = caption; mCaption = caption;
mQuickActionUri = quickActionUri; mQuickActionUri = quickActionUri;
mQuickActionCategory = quickActionCategory; mQuickActionCategory = quickActionCategory;
mDocId = docId;
mSnippetHash = snippetHash;
} }
@Override @Override
...@@ -303,7 +296,7 @@ class ContextualSearchFakeServer ...@@ -303,7 +296,7 @@ class ContextualSearchFakeServer
handleSearchTermResolutionResponse(mIsNetworkUnavailable, mResponseCode, handleSearchTermResolutionResponse(mIsNetworkUnavailable, mResponseCode,
mSearchTerm, mDisplayText, mAlternateTerm, mMid, mDoPreventPreload, mSearchTerm, mDisplayText, mAlternateTerm, mMid, mDoPreventPreload,
mStartAdjust, mEndAdjust, mContextLanguage, mThumbnailUrl, mCaption, mStartAdjust, mEndAdjust, mContextLanguage, mThumbnailUrl, mCaption,
mQuickActionUri, mQuickActionCategory, mDocId, mSnippetHash); mQuickActionUri, mQuickActionCategory);
mActiveFakeTapSearch = null; mActiveFakeTapSearch = null;
mDidFinishResolution = true; mDidFinishResolution = true;
...@@ -337,17 +330,15 @@ class ContextualSearchFakeServer ...@@ -337,17 +330,15 @@ class ContextualSearchFakeServer
* @param caption * @param caption
* @param quickActionUri * @param quickActionUri
* @param quickActionCategory * @param quickActionCategory
* @param docId
* @param snippetHash
*/ */
FakeSlowResolveSearch(String nodeId, boolean isNetworkUnavailable, int responseCode, FakeSlowResolveSearch(String nodeId, boolean isNetworkUnavailable, int responseCode,
String searchTerm, String displayText, String alternateTerm, String mid, String searchTerm, String displayText, String alternateTerm, String mid,
boolean doPreventPreload, int startAdjust, int endAdjust, String contextLanguage, boolean doPreventPreload, int startAdjust, int endAdjust, String contextLanguage,
String thumbnailUrl, String caption, String quickActionUri, int quickActionCategory, String thumbnailUrl, String caption, String quickActionUri,
long docId, long snippetHash) { int quickActionCategory) {
super(nodeId, isNetworkUnavailable, responseCode, searchTerm, displayText, super(nodeId, isNetworkUnavailable, responseCode, searchTerm, displayText,
alternateTerm, mid, doPreventPreload, startAdjust, endAdjust, contextLanguage, alternateTerm, mid, doPreventPreload, startAdjust, endAdjust, contextLanguage,
thumbnailUrl, caption, quickActionUri, quickActionCategory, docId, snippetHash); thumbnailUrl, caption, quickActionUri, quickActionCategory);
} }
@Override @Override
...@@ -573,11 +564,11 @@ class ContextualSearchFakeServer ...@@ -573,11 +564,11 @@ class ContextualSearchFakeServer
String searchTerm, String displayText, String alternateTerm, String mid, String searchTerm, String displayText, String alternateTerm, String mid,
boolean doPreventPreload, int selectionStartAdjust, int selectionEndAdjust, boolean doPreventPreload, int selectionStartAdjust, int selectionEndAdjust,
String contextLanguage, String thumbnailUrl, String caption, String quickActionUri, String contextLanguage, String thumbnailUrl, String caption, String quickActionUri,
int quickActionCategory, long docId, long snippetHash) { int quickActionCategory) {
mBaseManager.handleSearchTermResolutionResponse(isNetworkUnavailable, responseCode, mBaseManager.handleSearchTermResolutionResponse(isNetworkUnavailable, responseCode,
searchTerm, displayText, alternateTerm, mid, doPreventPreload, selectionStartAdjust, searchTerm, displayText, alternateTerm, mid, doPreventPreload, selectionStartAdjust,
selectionEndAdjust, contextLanguage, thumbnailUrl, caption, quickActionUri, selectionEndAdjust, contextLanguage, thumbnailUrl, caption, quickActionUri,
quickActionCategory, docId, snippetHash); quickActionCategory);
} }
@Override @Override
...@@ -623,26 +614,25 @@ class ContextualSearchFakeServer ...@@ -623,26 +614,25 @@ class ContextualSearchFakeServer
registerFakeLongPressSearch(new FakeLongPressSearch("resolution", "Resolution")); registerFakeLongPressSearch(new FakeLongPressSearch("resolution", "Resolution"));
registerFakeTapSearch(new FakeTapSearch("search", false, 200, "Search", "Search", registerFakeTapSearch(new FakeTapSearch("search", false, 200, "Search", "Search",
"alternate-term", "", false, 0, 0, "", "", "", "", QuickActionCategory.NONE, 0, 0)); "alternate-term", "", false, 0, 0, "", "", "", "", QuickActionCategory.NONE));
registerFakeTapSearch(new FakeTapSearch("term", false, 200, "Term", "Term", registerFakeTapSearch(new FakeTapSearch("term", false, 200, "Term", "Term",
"alternate-term", "", false, 0, 0, "", "", "", "", QuickActionCategory.NONE, 0, 0)); "alternate-term", "", false, 0, 0, "", "", "", "", QuickActionCategory.NONE));
registerFakeTapSearch(new FakeTapSearch("resolution", false, 200, "Resolution", registerFakeTapSearch(new FakeTapSearch("resolution", false, 200, "Resolution",
"Resolution", "alternate-term", "", false, 0, 0, "", "", "", "", "Resolution", "alternate-term", "", false, 0, 0, "", "", "", "",
QuickActionCategory.NONE, 0, 0)); QuickActionCategory.NONE));
registerFakeTapSearch( registerFakeTapSearch(new FakeTapSearch("german", false, 200, "Deutsche", "Deutsche",
new FakeTapSearch("german", false, 200, "Deutsche", "Deutsche", "alternate-term", "alternate-term", "", false, 0, 0, "de", "", "", "", QuickActionCategory.NONE));
"", false, 0, 0, "de", "", "", "", QuickActionCategory.NONE, 0, 0));
registerFakeTapSearch(new FakeTapSearch("intelligence", false, 200, "Intelligence", registerFakeTapSearch(new FakeTapSearch("intelligence", false, 200, "Intelligence",
"Intelligence", "alternate-term", "", false, 0, 0, "", "", "", "", "Intelligence", "alternate-term", "", false, 0, 0, "", "", "", "",
QuickActionCategory.NONE, ARBITRARY_DOC_ID, ARBITRARY_SNIPPET_HASH)); QuickActionCategory.NONE));
// Register a resolving search of "States" that expands to "United States". // Register a resolving search of "States" that expands to "United States".
registerFakeSlowResolveSearch(new FakeSlowResolveSearch("states", false, 200, "States", registerFakeSlowResolveSearch(new FakeSlowResolveSearch("states", false, 200, "States",
"States", "alternate-term", "", false, -7, 0, "", "", "", "", "States", "alternate-term", "", false, -7, 0, "", "", "", "",
QuickActionCategory.NONE, 0, 0)); QuickActionCategory.NONE));
registerFakeSlowResolveSearch(new FakeSlowResolveSearch("search", false, 200, "Search", registerFakeSlowResolveSearch(new FakeSlowResolveSearch("search", false, 200, "Search",
"Search", "alternate-term", "", false, 0, 0, "", "", "", "", "Search", "alternate-term", "", false, 0, 0, "", "", "", "",
QuickActionCategory.NONE, 0, 0)); QuickActionCategory.NONE));
} }
/** /**
......
...@@ -146,8 +146,6 @@ public class ContextualSearchManagerTest { ...@@ -146,8 +146,6 @@ public class ContextualSearchManagerTest {
// Integer values should contain @Feature values only. // Integer values should contain @Feature values only.
Set<Integer> expectedOutcomes = Set<Integer> expectedOutcomes =
new HashSet<Integer>(ContextualSearchRankerLoggerImpl.OUTCOMES.keySet()); new HashSet<Integer>(ContextualSearchRankerLoggerImpl.OUTCOMES.keySet());
expectedOutcomes.remove(ContextualSearchInteractionRecorder.Feature.OUTCOME_DOC_ID);
expectedOutcomes.remove(ContextualSearchInteractionRecorder.Feature.OUTCOME_SNIPPET_HASH);
// We don't log whether the quick action was clicked unless we actually have a quick action. // We don't log whether the quick action was clicked unless we actually have a quick action.
expectedOutcomes.remove( expectedOutcomes.remove(
ContextualSearchInteractionRecorder.Feature.OUTCOME_WAS_QUICK_ACTION_CLICKED); ContextualSearchInteractionRecorder.Feature.OUTCOME_WAS_QUICK_ACTION_CLICKED);
...@@ -500,7 +498,7 @@ public class ContextualSearchManagerTest { ...@@ -500,7 +498,7 @@ public class ContextualSearchManagerTest {
mFakeServer.handleSearchTermResolutionResponse(mIsNetworkUnavailable, mResponseCode, mFakeServer.handleSearchTermResolutionResponse(mIsNetworkUnavailable, mResponseCode,
mSearchTerm, mDisplayText, mAlternateTerm, mMid, mDoPreventPreload, mSearchTerm, mDisplayText, mAlternateTerm, mMid, mDoPreventPreload,
mStartAdjust, mEndAdjust, mContextLanguage, mThumbnailUrl, mCaption, mStartAdjust, mEndAdjust, mContextLanguage, mThumbnailUrl, mCaption,
mQuickActionUri, mQuickActionCategory, 0, 0); mQuickActionUri, mQuickActionCategory);
} }
} }
...@@ -3324,39 +3322,4 @@ public class ContextualSearchManagerTest { ...@@ -3324,39 +3322,4 @@ public class ContextualSearchManagerTest {
} }
}); });
} }
private void assertRecordedSensitiveDataToUkm(boolean doAssert)
throws InterruptedException, TimeoutException {
simulateTapSearch("intelligence");
// The panel must be closed for outcomes to be logged.
// Close the panel by clicking far away in order to make sure the outcomes get logged by
// the hideContextualSearchUi call to writeRankerLoggerOutcomesAndReset.
clickWordNode("states-far");
waitForPanelToClose();
Assert.assertEquals(doAssert,
getRankerLogger().getOutcomesLogged().containsKey(
ContextualSearchInteractionRecorder.Feature.OUTCOME_DOC_ID));
Assert.assertEquals(doAssert,
getRankerLogger().getOutcomesLogged().containsKey(
ContextualSearchInteractionRecorder.Feature.OUTCOME_SNIPPET_HASH));
}
@Test
@SmallTest
@Feature({"ContextualSearch"})
@CommandLineFlags.Add(ContextualSearchRankerLoggerImpl.UKM_DEV_DATA_TTS_ENABLE)
@MinAndroidSdkLevel(Build.VERSION_CODES.N)
public void testCanRecordSensitiveDataToUkm() throws InterruptedException, TimeoutException {
assertRecordedSensitiveDataToUkm(true);
}
@Test
@SmallTest
@Feature({"ContextualSearch"})
@MinAndroidSdkLevel(Build.VERSION_CODES.N)
public void testDoesNotRecordSensitiveDataToUkmWithoutCommandLineFlag()
throws InterruptedException, TimeoutException {
// Same test as above, but without the command-line-flag, does not log.
assertRecordedSensitiveDataToUkm(false);
}
} }
...@@ -99,7 +99,7 @@ public class ContextualSearchTapEventTest { ...@@ -99,7 +99,7 @@ public class ContextualSearchTapEventTest {
public void startSearchTermResolutionRequest(String selection) { public void startSearchTermResolutionRequest(String selection) {
// Skip native calls and immediately "resolve" the search term. // Skip native calls and immediately "resolve" the search term.
onSearchTermResolutionResponse(true, 200, selection, selection, "", "", false, 0, 10, onSearchTermResolutionResponse(true, 200, selection, selection, "", "", false, 0, 10,
"", "", "", "", QuickActionCategory.NONE, 0, 0); "", "", "", "", QuickActionCategory.NONE);
} }
@Override @Override
......
...@@ -57,8 +57,6 @@ const char kContextualSearchCaption[] = "caption"; ...@@ -57,8 +57,6 @@ const char kContextualSearchCaption[] = "caption";
const char kContextualSearchThumbnail[] = "thumbnail"; const char kContextualSearchThumbnail[] = "thumbnail";
const char kContextualSearchAction[] = "action"; const char kContextualSearchAction[] = "action";
const char kContextualSearchCategory[] = "category"; const char kContextualSearchCategory[] = "category";
const char kContextualSearchDocIdParam[] = "docid";
const char kContextualSearchSnippetParam[] = "snippet";
const char kActionCategoryAddress[] = "ADDRESS"; const char kActionCategoryAddress[] = "ADDRESS";
const char kActionCategoryEmail[] = "EMAIL"; const char kActionCategoryEmail[] = "EMAIL";
...@@ -215,14 +213,11 @@ ContextualSearchDelegate::GetResolvedSearchTermFromJson( ...@@ -215,14 +213,11 @@ ContextualSearchDelegate::GetResolvedSearchTermFromJson(
std::string caption = ""; std::string caption = "";
std::string quick_action_uri = ""; std::string quick_action_uri = "";
QuickActionCategory quick_action_category = QUICK_ACTION_CATEGORY_NONE; QuickActionCategory quick_action_category = QUICK_ACTION_CATEGORY_NONE;
long long doc_id = 0;
long long snippet_hash = 0;
DecodeSearchTermFromJsonResponse( DecodeSearchTermFromJsonResponse(
json_string, &search_term, &display_text, &alternate_term, &mid, json_string, &search_term, &display_text, &alternate_term, &mid,
&prevent_preload, &mention_start, &mention_end, &context_language, &prevent_preload, &mention_start, &mention_end, &context_language,
&thumbnail_url, &caption, &quick_action_uri, &quick_action_category, &thumbnail_url, &caption, &quick_action_uri, &quick_action_category);
&doc_id, &snippet_hash);
if (mention_start != 0 || mention_end != 0) { if (mention_start != 0 || mention_end != 0) {
// Sanity check that our selection is non-zero and it is less than // Sanity check that our selection is non-zero and it is less than
// 100 characters as that would make contextual search bar hide. // 100 characters as that would make contextual search bar hide.
...@@ -244,7 +239,7 @@ ContextualSearchDelegate::GetResolvedSearchTermFromJson( ...@@ -244,7 +239,7 @@ ContextualSearchDelegate::GetResolvedSearchTermFromJson(
is_invalid, response_code, search_term, display_text, alternate_term, mid, is_invalid, response_code, search_term, display_text, alternate_term, mid,
prevent_preload == kDoPreventPreloadValue, start_adjust, end_adjust, prevent_preload == kDoPreventPreloadValue, start_adjust, end_adjust,
context_language, thumbnail_url, caption, quick_action_uri, context_language, thumbnail_url, caption, quick_action_uri,
quick_action_category, doc_id, snippet_hash)); quick_action_category));
} }
std::string ContextualSearchDelegate::BuildRequestUrl( std::string ContextualSearchDelegate::BuildRequestUrl(
...@@ -432,9 +427,7 @@ void ContextualSearchDelegate::DecodeSearchTermFromJsonResponse( ...@@ -432,9 +427,7 @@ void ContextualSearchDelegate::DecodeSearchTermFromJsonResponse(
std::string* thumbnail_url, std::string* thumbnail_url,
std::string* caption, std::string* caption,
std::string* quick_action_uri, std::string* quick_action_uri,
QuickActionCategory* quick_action_category, QuickActionCategory* quick_action_category) {
long long* doc_id,
long long* snippet_hash) {
bool contains_xssi_escape = bool contains_xssi_escape =
base::StartsWith(response, kXssiEscape, base::CompareCase::SENSITIVE); base::StartsWith(response, kXssiEscape, base::CompareCase::SENSITIVE);
const std::string& proper_json = const std::string& proper_json =
...@@ -506,18 +499,6 @@ void ContextualSearchDelegate::DecodeSearchTermFromJsonResponse( ...@@ -506,18 +499,6 @@ void ContextualSearchDelegate::DecodeSearchTermFromJsonResponse(
} }
} }
// Check for development-data for the offline click-log.
// TODO(donnd): remove before the next release. See https://crbug.com/894568
// for details.
std::string doc_id_string;
std::string snippet_hash_string;
dict->GetString(kContextualSearchDocIdParam, &doc_id_string);
dict->GetString(kContextualSearchSnippetParam, &snippet_hash_string);
if (!doc_id_string.empty())
*doc_id = std::stoll(doc_id_string, nullptr);
if (!snippet_hash_string.empty())
*snippet_hash = std::stoll(snippet_hash_string, nullptr);
// Any Contextual Cards integration. // Any Contextual Cards integration.
// For testing purposes check if there was a diagnostic from Contextual // For testing purposes check if there was a diagnostic from Contextual
// Cards and output that into the log. // Cards and output that into the log.
......
...@@ -149,9 +149,7 @@ class ContextualSearchDelegate ...@@ -149,9 +149,7 @@ class ContextualSearchDelegate
std::string* thumbnail_url, std::string* thumbnail_url,
std::string* caption, std::string* caption,
std::string* quick_action_uri, std::string* quick_action_uri,
QuickActionCategory* quick_action_category, QuickActionCategory* quick_action_category);
long long* doc_id,
long long* snippet_hash);
// Extracts the start and end location from a mentions list, and sets the // Extracts the start and end location from a mentions list, and sets the
// integers referenced by |startResult| and |endResult|. // integers referenced by |startResult| and |endResult|.
......
...@@ -540,14 +540,11 @@ TEST_F(ContextualSearchDelegateTest, DecodeSearchTermFromJsonResponse) { ...@@ -540,14 +540,11 @@ TEST_F(ContextualSearchDelegateTest, DecodeSearchTermFromJsonResponse) {
std::string caption; std::string caption;
std::string quick_action_uri; std::string quick_action_uri;
QuickActionCategory quick_action_category = QUICK_ACTION_CATEGORY_NONE; QuickActionCategory quick_action_category = QUICK_ACTION_CATEGORY_NONE;
long long doc_id = 0;
long long snippet_hash = 0;
delegate_->DecodeSearchTermFromJsonResponse( delegate_->DecodeSearchTermFromJsonResponse(
json_with_escape, &search_term, &display_text, &alternate_term, &mid, json_with_escape, &search_term, &display_text, &alternate_term, &mid,
&prevent_preload, &mention_start, &mention_end, &context_language, &prevent_preload, &mention_start, &mention_end, &context_language,
&thumbnail_url, &caption, &quick_action_uri, &quick_action_category, &thumbnail_url, &caption, &quick_action_uri, &quick_action_category);
&doc_id, &snippet_hash);
EXPECT_EQ("obama", search_term); EXPECT_EQ("obama", search_term);
EXPECT_EQ("Barack Obama", display_text); EXPECT_EQ("Barack Obama", display_text);
...@@ -559,8 +556,6 @@ TEST_F(ContextualSearchDelegateTest, DecodeSearchTermFromJsonResponse) { ...@@ -559,8 +556,6 @@ TEST_F(ContextualSearchDelegateTest, DecodeSearchTermFromJsonResponse) {
EXPECT_EQ("", caption); EXPECT_EQ("", caption);
EXPECT_EQ("", quick_action_uri); EXPECT_EQ("", quick_action_uri);
EXPECT_EQ(QUICK_ACTION_CATEGORY_NONE, quick_action_category); EXPECT_EQ(QUICK_ACTION_CATEGORY_NONE, quick_action_category);
EXPECT_EQ(0ll, doc_id);
EXPECT_EQ(0ll, snippet_hash);
} }
TEST_F(ContextualSearchDelegateTest, ResponseWithLanguage) { TEST_F(ContextualSearchDelegateTest, ResponseWithLanguage) {
......
...@@ -186,8 +186,7 @@ void ContextualSearchManager::OnSearchTermResolutionResponse( ...@@ -186,8 +186,7 @@ void ContextualSearchManager::OnSearchTermResolutionResponse(
resolved_search_term.selection_start_adjust, resolved_search_term.selection_start_adjust,
resolved_search_term.selection_end_adjust, j_context_language, resolved_search_term.selection_end_adjust, j_context_language,
j_thumbnail_url, j_caption, j_quick_action_uri, j_thumbnail_url, j_caption, j_quick_action_uri,
resolved_search_term.quick_action_category, resolved_search_term.doc_id, resolved_search_term.quick_action_category);
resolved_search_term.snippet_hash);
} }
void ContextualSearchManager::OnTextSurroundingSelectionAvailable( void ContextualSearchManager::OnTextSurroundingSelectionAvailable(
......
...@@ -79,13 +79,13 @@ void ContextualSearchRankerLoggerImpl::LogFeature( ...@@ -79,13 +79,13 @@ void ContextualSearchRankerLoggerImpl::LogFeature(
features[feature_name].set_int32_value(value); features[feature_name].set_int32_value(value);
} }
void ContextualSearchRankerLoggerImpl::LogInt32( void ContextualSearchRankerLoggerImpl::LogLong(
JNIEnv* env, JNIEnv* env,
jobject obj, jobject obj,
const base::android::JavaParamRef<jstring>& j_feature, const base::android::JavaParamRef<jstring>& j_feature,
jint j_int) { jlong j_long) {
std::string feature = base::android::ConvertJavaStringToUTF8(env, j_feature); std::string feature = base::android::ConvertJavaStringToUTF8(env, j_feature);
LogFeature(feature, j_int); LogFeature(feature, j_long);
} }
AssistRankerPrediction ContextualSearchRankerLoggerImpl::RunInference( AssistRankerPrediction ContextualSearchRankerLoggerImpl::RunInference(
......
...@@ -49,11 +49,11 @@ class ContextualSearchRankerLoggerImpl { ...@@ -49,11 +49,11 @@ class ContextualSearchRankerLoggerImpl {
jobject obj, jobject obj,
const base::android::JavaParamRef<jobject>& java_web_contents); const base::android::JavaParamRef<jobject>& java_web_contents);
// Logs an int32 value with the given feature name. // Logs a long value with the given feature name.
void LogInt32(JNIEnv* env, void LogLong(JNIEnv* env,
jobject obj, jobject obj,
const base::android::JavaParamRef<jstring>& j_feature, const base::android::JavaParamRef<jstring>& j_feature,
jint j_int); jlong j_long);
// Runs the model and returns the inference result as an // Runs the model and returns the inference result as an
// AssistRankerPrediction enum. // AssistRankerPrediction enum.
......
...@@ -20,9 +20,7 @@ ResolvedSearchTerm::ResolvedSearchTerm(int response_code) ...@@ -20,9 +20,7 @@ ResolvedSearchTerm::ResolvedSearchTerm(int response_code)
thumbnail_url(""), thumbnail_url(""),
caption(""), caption(""),
quick_action_uri(""), quick_action_uri(""),
quick_action_category(QUICK_ACTION_CATEGORY_NONE), quick_action_category(QUICK_ACTION_CATEGORY_NONE) {}
doc_id(0),
snippet_hash(0) {}
ResolvedSearchTerm::ResolvedSearchTerm( ResolvedSearchTerm::ResolvedSearchTerm(
bool is_invalid, bool is_invalid,
...@@ -38,9 +36,7 @@ ResolvedSearchTerm::ResolvedSearchTerm( ...@@ -38,9 +36,7 @@ ResolvedSearchTerm::ResolvedSearchTerm(
const std::string& thumbnail_url, const std::string& thumbnail_url,
const std::string& caption, const std::string& caption,
const std::string& quick_action_uri, const std::string& quick_action_uri,
const QuickActionCategory& quick_action_category, const QuickActionCategory& quick_action_category)
long long doc_id,
long long snippet_hash)
: is_invalid(is_invalid), : is_invalid(is_invalid),
response_code(response_code), response_code(response_code),
search_term(search_term), search_term(search_term),
...@@ -54,8 +50,6 @@ ResolvedSearchTerm::ResolvedSearchTerm( ...@@ -54,8 +50,6 @@ ResolvedSearchTerm::ResolvedSearchTerm(
thumbnail_url(thumbnail_url), thumbnail_url(thumbnail_url),
caption(caption), caption(caption),
quick_action_uri(quick_action_uri), quick_action_uri(quick_action_uri),
quick_action_category(quick_action_category), quick_action_category(quick_action_category) {}
doc_id(doc_id),
snippet_hash(snippet_hash) {}
ResolvedSearchTerm::~ResolvedSearchTerm() {} ResolvedSearchTerm::~ResolvedSearchTerm() {}
...@@ -40,9 +40,7 @@ struct ResolvedSearchTerm { ...@@ -40,9 +40,7 @@ struct ResolvedSearchTerm {
const std::string& thumbnail_url, const std::string& thumbnail_url,
const std::string& caption, const std::string& caption,
const std::string& quick_action_uri, const std::string& quick_action_uri,
const QuickActionCategory& quick_action_category, const QuickActionCategory& quick_action_category);
long long doc_id,
long long snippet_hash);
~ResolvedSearchTerm(); ~ResolvedSearchTerm();
const bool is_invalid; const bool is_invalid;
...@@ -60,8 +58,6 @@ struct ResolvedSearchTerm { ...@@ -60,8 +58,6 @@ struct ResolvedSearchTerm {
const std::string caption; const std::string caption;
const std::string quick_action_uri; const std::string quick_action_uri;
const QuickActionCategory quick_action_category; const QuickActionCategory quick_action_category;
const long long doc_id;
const long long snippet_hash;
DISALLOW_COPY_AND_ASSIGN(ResolvedSearchTerm); DISALLOW_COPY_AND_ASSIGN(ResolvedSearchTerm);
}; };
......
...@@ -48,12 +48,8 @@ const base::flat_set<std::string>* GetContextualSearchFeatureWhitelist() { ...@@ -48,12 +48,8 @@ const base::flat_set<std::string>* GetContextualSearchFeatureWhitelist() {
"IsShortWord", "IsShortWord",
"IsWordEdge", "IsWordEdge",
"OpenCount", "OpenCount",
"OutcomeDocIdHighBits",
"OutcomeDocIdLowBits",
"OutcomeRankerDidPredict", "OutcomeRankerDidPredict",
"OutcomeRankerPrediction", "OutcomeRankerPrediction",
"OutcomeSnippetHashHighBits",
"OutcomeSnippetHashLowBits",
"OutcomeWasCardsDataShown", "OutcomeWasCardsDataShown",
"OutcomeWasPanelOpened", "OutcomeWasPanelOpened",
"OutcomeWasQuickActionClicked", "OutcomeWasQuickActionClicked",
......
...@@ -979,20 +979,6 @@ be describing additional metrics about the same event. ...@@ -979,20 +979,6 @@ be describing additional metrics about the same event.
this user since M-69. this user since M-69.
</summary> </summary>
</metric> </metric>
<metric name="OutcomeDocIdHighBits">
<summary>
Rarely emits an int32 with the high-order bits of a DocID for the base
page. This is development-only data for M-72 excluding Beta and Stable.
See go/ukm-dev-data and https://crbug.com/894568 for details.
</summary>
</metric>
<metric name="OutcomeDocIdLowBits">
<summary>
Rarely emits an int32 with the low-order bits of a DocID for the base
page. This is development-only data for M-72 excluding Beta and Stable.
See go/ukm-dev-data and https://crbug.com/894568 for details.
</summary>
</metric>
<metric name="OutcomeRankerDidPredict"> <metric name="OutcomeRankerDidPredict">
<summary> <summary>
Emits a 1 or 0 to indicate whether Ranker was able to make a prediction. Emits a 1 or 0 to indicate whether Ranker was able to make a prediction.
...@@ -1003,20 +989,6 @@ be describing additional metrics about the same event. ...@@ -1003,20 +989,6 @@ be describing additional metrics about the same event.
Emits a 1 or 0 to indicate what Ranker's prediction was for this record. Emits a 1 or 0 to indicate what Ranker's prediction was for this record.
</summary> </summary>
</metric> </metric>
<metric name="OutcomeSnippetHashHighBits">
<summary>
Rarely emits an int32 with the high-order bits of a hashed-snippet from
the base page. This is development-only data for M-72 excluding Beta and
Stable. See go/ukm-dev-data and https://crbug.com/894568 for details.
</summary>
</metric>
<metric name="OutcomeSnippetHashLowBits">
<summary>
Rarely emits an int32 with the low-order bits of a hashed-snippet from the
base page. Development-only data for M-72 excluding Beta and Stable. See
go/ukm-dev-data and https://crbug.com/894568 for details.
</summary>
</metric>
<metric name="OutcomeWasCardsDataShown"> <metric name="OutcomeWasCardsDataShown">
<summary> <summary>
Emits a 1 or 0 to indicate whether any Contextual Cards data was shown in Emits a 1 or 0 to indicate whether any Contextual Cards data was shown in
......
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