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 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_RANKER_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_RANKER_H_ |
6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_RANKER_H_ | 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_RANKER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/feature_list.h" | 11 #include "base/feature_list.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
14 | 14 |
15 namespace chrome_intelligence { | 15 namespace chrome_intelligence { |
16 class TranslateRankerModel; | 16 class TranslateRankerModel; |
17 } | 17 } |
18 | 18 |
19 namespace metrics { | 19 namespace metrics { |
20 class TranslateEventProto; | 20 class TranslateEventProto; |
21 } | 21 } |
22 | 22 |
23 namespace translate { | 23 namespace translate { |
24 | 24 |
25 class TranslatePrefs; | 25 class TranslatePrefs; |
26 class TranslateRankerMetricsProvider; | |
27 class TranslateURLFetcher; | 26 class TranslateURLFetcher; |
28 | 27 |
29 // Features used to enable ranker query, enforcement and logging. Note that | 28 // Features used to enable ranker query, enforcement and logging. Note that |
30 // enabling enforcement implies (forces) enabling queries. | 29 // enabling enforcement implies (forces) enabling queries. |
31 extern const base::Feature kTranslateRankerQuery; | 30 extern const base::Feature kTranslateRankerQuery; |
32 extern const base::Feature kTranslateRankerEnforcement; | 31 extern const base::Feature kTranslateRankerEnforcement; |
33 extern const base::Feature kTranslateRankerLogging; | 32 extern const base::Feature kTranslateRankerLogging; |
34 | 33 |
35 // If enabled, downloads a translate ranker model and uses it to determine | 34 // If enabled, downloads a translate ranker model and uses it to determine |
36 // whether the user should be given a translation prompt or not. | 35 // whether the user should be given a translation prompt or not. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 FRIEND_TEST_ALL_PREFIXES(TranslateRankerTest, CalculateScore); | 119 FRIEND_TEST_ALL_PREFIXES(TranslateRankerTest, CalculateScore); |
121 | 120 |
122 friend struct base::DefaultSingletonTraits<TranslateRanker>; | 121 friend struct base::DefaultSingletonTraits<TranslateRanker>; |
123 | 122 |
124 DISALLOW_COPY_AND_ASSIGN(TranslateRanker); | 123 DISALLOW_COPY_AND_ASSIGN(TranslateRanker); |
125 }; | 124 }; |
126 | 125 |
127 } // namespace translate | 126 } // namespace translate |
128 | 127 |
129 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_RANKER_H_ | 128 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_RANKER_H_ |
OLD | NEW |