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

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

Issue 2890843003: Simplify TranslateRanker API. (Closed)
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: components/translate/core/browser/translate_ranker.h
diff --git a/components/translate/core/browser/translate_ranker.h b/components/translate/core/browser/translate_ranker.h
index 3b095383b4d4880468e094dac0c6e23c4e2dac0f..9867052a25ff730b9d70245ebfcb1e7593a117aa 100644
--- a/components/translate/core/browser/translate_ranker.h
+++ b/components/translate/core/browser/translate_ranker.h
@@ -20,8 +20,6 @@ class TranslateEventProto;
namespace translate {
-class TranslatePrefs;
-
// If enabled, downloads a translate ranker model and uses it to determine
// whether the user should be given a translation prompt or not.
class TranslateRanker : public KeyedService {
@@ -32,14 +30,10 @@ class TranslateRanker : public KeyedService {
virtual uint32_t GetModelVersion() const = 0;
// Returns true if executing the ranker model in the translation prompt
- // context described by |translate_prefs|, |src_lang|, |dst_lang| and possibly
+ // context described by |translate_event| and possibly
// other global browser context attributes suggests that the user should be
// prompted as to whether translation should be performed.
- // TODO(hamelphi): Take only the proto as input and extract features from it.
virtual bool ShouldOfferTranslation(
- const TranslatePrefs& translate_prefs,
- const std::string& src_lang,
- const std::string& dst_lang,
metrics::TranslateEventProto* translate_event) = 0;
// Transfers cached translate events to the given vector pointer and clears
« no previous file with comments | « components/translate/core/browser/translate_manager.cc ('k') | components/translate/core/browser/translate_ranker_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698