OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 java.util.HashSet; | 7 import java.util.HashSet; |
8 import java.util.Set; | 8 import java.util.Set; |
9 | 9 |
10 /** | 10 /** |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 for (ContextualSearchHeuristic heuristic : mHeuristics) { | 56 for (ContextualSearchHeuristic heuristic : mHeuristics) { |
57 if (heuristic.shouldAggregateLogForTapSuppression() | 57 if (heuristic.shouldAggregateLogForTapSuppression() |
58 && heuristic.isConditionSatisfiedForAggregateLogging()) { | 58 && heuristic.isConditionSatisfiedForAggregateLogging()) { |
59 return true; | 59 return true; |
60 } | 60 } |
61 } | 61 } |
62 return false; | 62 return false; |
63 } | 63 } |
64 | 64 |
65 /** | 65 /** |
66 * Logs all the heuristics to the given logger. | 66 * Logs all the heuristics that want to provide a Ranker "feature" to the gi
ven logger. |
67 * @param logger The logger to log to. | 67 * @param logger The logger to log to. |
68 */ | 68 */ |
69 public void logRankerTapSuppression(ContextualSearchRankerLogger logger) { | 69 public void logRankerTapSuppression(ContextualSearchRankerLogger logger) { |
70 for (ContextualSearchHeuristic heuristic : mHeuristics) { | 70 for (ContextualSearchHeuristic heuristic : mHeuristics) { |
71 heuristic.logRankerTapSuppression(logger); | 71 heuristic.logRankerTapSuppression(logger); |
72 } | 72 } |
73 } | 73 } |
| 74 |
| 75 /** |
| 76 * Logs all the heuristics that want to provide outcomes to Ranker to the gi
ven logger. |
| 77 * @param logger The logger to log to. |
| 78 */ |
| 79 public void logRankerTapSuppressionOutcome(ContextualSearchRankerLogger logg
er) { |
| 80 for (ContextualSearchHeuristic heuristic : mHeuristics) { |
| 81 heuristic.logRankerTapSuppressionOutcome(logger); |
| 82 } |
| 83 } |
74 } | 84 } |
OLD | NEW |