| 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 #include <vector> | 10 #include <vector> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // |translate_event.decision_overrides()|. If override is disabled, | 53 // |translate_event.decision_overrides()|. If override is disabled, |
| 54 // returns false and finalize and record |translate_event| with | 54 // returns false and finalize and record |translate_event| with |
| 55 // |event_type| as |translate_event.event_type()|. |event_type| | 55 // |event_type| as |translate_event.event_type()|. |event_type| |
| 56 // must be one of the values defined by | 56 // must be one of the values defined by |
| 57 // metrics::TranslateEventProto::EventType. | 57 // metrics::TranslateEventProto::EventType. |
| 58 virtual bool ShouldOverrideDecision( | 58 virtual bool ShouldOverrideDecision( |
| 59 int event_type, | 59 int event_type, |
| 60 const GURL& url, | 60 const GURL& url, |
| 61 metrics::TranslateEventProto* translate_event) = 0; | 61 metrics::TranslateEventProto* translate_event) = 0; |
| 62 | 62 |
| 63 // Override the default enabled/disabled state of translate event logging. |
| 64 virtual void EnableLogging(bool enable_logging) = 0; |
| 65 |
| 63 private: | 66 private: |
| 64 DISALLOW_COPY_AND_ASSIGN(TranslateRanker); | 67 DISALLOW_COPY_AND_ASSIGN(TranslateRanker); |
| 65 }; | 68 }; |
| 66 | 69 |
| 67 } // namespace translate | 70 } // namespace translate |
| 68 | 71 |
| 69 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_RANKER_H_ | 72 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_RANKER_H_ |
| OLD | NEW |