Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java

Issue 2857333002: [TTS] Write initial Tap-features to Ranker. (Closed)
Patch Set: Added an entry for CS and metrics written to ukm.xml. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.contextualsearch; 5 package org.chromium.chrome.browser.contextualsearch;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.os.Handler; 8 import android.os.Handler;
9 import android.text.TextUtils; 9 import android.text.TextUtils;
10 import android.view.View; 10 import android.view.View;
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 public void handleMetricsForWouldSuppressTap(ContextualSearchHeuristics tapH euristics) { 1301 public void handleMetricsForWouldSuppressTap(ContextualSearchHeuristics tapH euristics) {
1302 mHeuristics = tapHeuristics; 1302 mHeuristics = tapHeuristics;
1303 1303
1304 // TODO(donnd): QuickAnswersHeuristic is getting added to TapSuppression Heuristics and 1304 // TODO(donnd): QuickAnswersHeuristic is getting added to TapSuppression Heuristics and
1305 // and getting considered in TapSuppressionHeuristics#shouldSuppressTap( ). It should 1305 // and getting considered in TapSuppressionHeuristics#shouldSuppressTap( ). It should
1306 // be a part of ContextualSearchHeuristics for logging purposes but not for suppression. 1306 // be a part of ContextualSearchHeuristics for logging purposes but not for suppression.
1307 mQuickAnswersHeuristic = new QuickAnswersHeuristic(); 1307 mQuickAnswersHeuristic = new QuickAnswersHeuristic();
1308 mHeuristics.add(mQuickAnswersHeuristic); 1308 mHeuristics.add(mQuickAnswersHeuristic);
1309 1309
1310 mSearchPanel.getPanelMetrics().setResultsSeenExperiments(mHeuristics); 1310 mSearchPanel.getPanelMetrics().setResultsSeenExperiments(mHeuristics);
1311 mSearchPanel.getPanelMetrics().setRankerLogExperiments(mHeuristics); 1311 mSearchPanel.getPanelMetrics().setRankerLogExperiments(mHeuristics, getB asePageUrl());
1312 } 1312 }
1313 1313
1314 @Override 1314 @Override
1315 public void handleValidTap() { 1315 public void handleValidTap() {
1316 if (mIsAccessibilityModeEnabled) return; 1316 if (mIsAccessibilityModeEnabled) return;
1317 1317
1318 mInternalStateController.enter(InternalState.TAP_RECOGNIZED); 1318 mInternalStateController.enter(InternalState.TAP_RECOGNIZED);
1319 } 1319 }
1320 1320
1321 /** 1321 /**
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 private native void nativeStartSearchTermResolutionRequest(long nativeContex tualSearchManager, 1596 private native void nativeStartSearchTermResolutionRequest(long nativeContex tualSearchManager,
1597 ContextualSearchContext contextualSearchContext, WebContents baseWeb Contents); 1597 ContextualSearchContext contextualSearchContext, WebContents baseWeb Contents);
1598 protected native void nativeGatherSurroundingText(long nativeContextualSearc hManager, 1598 protected native void nativeGatherSurroundingText(long nativeContextualSearc hManager,
1599 ContextualSearchContext contextualSearchContext, WebContents baseWeb Contents); 1599 ContextualSearchContext contextualSearchContext, WebContents baseWeb Contents);
1600 private native void nativeEnableContextualSearchJsApiForOverlay( 1600 private native void nativeEnableContextualSearchJsApiForOverlay(
1601 long nativeContextualSearchManager, WebContents overlayWebContents); 1601 long nativeContextualSearchManager, WebContents overlayWebContents);
1602 // Don't call these directly, instead call the private methods that cache th e results. 1602 // Don't call these directly, instead call the private methods that cache th e results.
1603 private native String nativeGetTargetLanguage(long nativeContextualSearchMan ager); 1603 private native String nativeGetTargetLanguage(long nativeContextualSearchMan ager);
1604 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa nager); 1604 private native String nativeGetAcceptLanguages(long nativeContextualSearchMa nager);
1605 } 1605 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698