Chromium Code Reviews| Index: chrome/browser/translate/chrome_translate_client.cc |
| diff --git a/chrome/browser/translate/chrome_translate_client.cc b/chrome/browser/translate/chrome_translate_client.cc |
| index c29d82fc79b9440dc06d7cac05cc956683739d89..8b60d4099d9fc3661fc0c795aaccada195889501 100644 |
| --- a/chrome/browser/translate/chrome_translate_client.cc |
| +++ b/chrome/browser/translate/chrome_translate_client.cc |
| @@ -86,9 +86,12 @@ void LogLanguageDetectionEvent( |
| // If entry is null, we don't record the page. |
| // The navigation entry can be null in situations like download or initial |
| // blank page. |
| - if (entry != nullptr) { |
| + DCHECK(web_contents) << "null contents"; |
|
groby-ooo-7-16
2017/06/07 16:37:50
Probably doesn't need the "null contents" text - D
renjieliu1
2017/06/08 04:33:51
Done.
|
| + if (entry != nullptr && |
| + TranslateService::IsTranslatableURL(entry->GetVirtualURL())) { |
| user_event_service->RecordUserEvent( |
| - translate::ConstructLanguageDetectionEvent(details)); |
| + translate::ConstructLanguageDetectionEvent( |
| + entry->GetTimestamp().ToInternalValue(), details)); |
| } |
| } |