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

Unified Diff: chrome/browser/translate/chrome_translate_client.cc

Issue 2916873004: Quick fix for logging. (Closed)
Patch Set: just use IsTranslatebleURL. 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: 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..b51735250d4906d7bbdfe80e977c77eca8d15996 100644
--- a/chrome/browser/translate/chrome_translate_client.cc
+++ b/chrome/browser/translate/chrome_translate_client.cc
@@ -86,9 +86,11 @@ 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) {
+ if (entry != nullptr &&
+ TranslateService::IsTranslatableURL(entry->GetVirtualURL())) {
skym 2017/06/02 21:22:40 Would be nice to have a test case get filtered by
renjieliu1 2017/06/05 06:39:19 Done.
user_event_service->RecordUserEvent(
- translate::ConstructLanguageDetectionEvent(details));
+ translate::ConstructLanguageDetectionEvent(
+ entry->GetTimestamp().ToInternalValue(), details));
}
}

Powered by Google App Engine
This is Rietveld 408576698