Chromium Code Reviews| Index: chrome/renderer/translate/translate_helper.h |
| diff --git a/chrome/renderer/translate/translate_helper.h b/chrome/renderer/translate/translate_helper.h |
| index 1c357bf9e606308f1a6f2d9ff8fc487733b2c55e..a4530c4ad3aff6e1e54192e8f545d6eaa737b029 100644 |
| --- a/chrome/renderer/translate/translate_helper.h |
| +++ b/chrome/renderer/translate/translate_helper.h |
| @@ -113,6 +113,13 @@ class TranslateHelper : public content::RenderViewObserver { |
| FRIEND_TEST_ALL_PREFIXES(TranslateHelperTest, SimilarLanguageCode); |
| FRIEND_TEST_ALL_PREFIXES(TranslateHelperTest, WellKnownWrongConfiguration); |
| + enum LanguageDetectionTiming { |
| + ON_TIME, // Language detection was performed as soon as it was requested |
| + DEFERRED, // Language detection couldn't be performed when it was requested |
| + RESUMED, // A deferred language detection attempt was completed later |
| + kLanguageDetectionTimingMax // bounding value for this enum |
|
Alexei Svitkine (slow)
2014/07/16 14:50:40
Nit: Use same naming convention as for the other e
andrewhayden
2014/07/17 08:36:19
This is copied from the same place the rest of thi
|
| + }; |
| + |
| // Converts language code to the one used in server supporting list. |
| static void ConvertLanguageCodeSynonym(std::string* code); |
| @@ -167,6 +174,11 @@ class TranslateHelper : public content::RenderViewObserver { |
| // Callback triggered when CLD data becomes available. |
| void OnCldDataAvailable(); |
| + // Record the timing of language detection, immediately sending an IPC-based |
|
jar (doing other things)
2014/07/16 16:44:44
nit: perhaps better would be to aggregate these re
andrewhayden
2014/07/17 08:36:19
Totally agree, but again very far out of scope for
|
| + // histogram delta update to the browser process in case the hosting renderer |
| + // process terminates before the metrics would otherwise be transferred. |
| + void RecordLanguageDetectionTiming(LanguageDetectionTiming); |
| + |
| // An ever-increasing sequence number of the current page, used to match up |
| // translation requests with responses. |
| int page_seq_no_; |