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

Unified Diff: components/translate/core/browser/translate_manager.h

Issue 2697703004: Allow TranslateRanker to override decisions taken by heuristics. (Closed)
Patch Set: Merge & Cleanup commented code. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: components/translate/core/browser/translate_manager.h
diff --git a/components/translate/core/browser/translate_manager.h b/components/translate/core/browser/translate_manager.h
index b164051b3e4b4c0832d85bc2ba76bd9391116abf..daf58a5c80ed3ffe2bdf341b20252a1898da83ab 100644
--- a/components/translate/core/browser/translate_manager.h
+++ b/components/translate/core/browser/translate_manager.h
@@ -124,6 +124,15 @@ class TranslateManager {
// testing, set to true to offer anyway.
static void SetIgnoreMissingKeyForTesting(bool ignore);
+ // Returns true if the decision should be overridden and logs the event
+ // appropriately. |event_type| must be one of the
+ // values defined by metrics::TranslateEventProto::EventType.
+ bool ShouldOverrideDecision(int event_type);
+
+ // Returns true if the BubbleUI should be suppressed.
+ bool ShouldSuppressBubbleUI(bool triggered_from_menu,
+ const std::string& source_language);
Roger McFarlane (Chromium) 2017/04/19 16:16:16 why is this bubble ui specific?
hamelphi 2017/04/19 18:19:48 I don't know the reasons why this logic is only ap
+
private:
friend class translate::testing::TranslateManagerTest;

Powered by Google App Engine
This is Rietveld 408576698