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

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

Issue 14494004: Added the 'Translation Logs' tab to chrome://translate-internals/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: first commit Created 7 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/translate_tab_helper.cc
diff --git a/chrome/browser/translate/translate_tab_helper.cc b/chrome/browser/translate/translate_tab_helper.cc
index 3a14a471ec12714af3f4b2938769784c22920867..4dd71bba104575d629d4d060db84468f2a898ffa 100644
--- a/chrome/browser/translate/translate_tab_helper.cc
+++ b/chrome/browser/translate/translate_tab_helper.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/translate/page_translated_details.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/language_detection_details.h"
#include "chrome/common/render_messages.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
@@ -41,15 +42,16 @@ void TranslateTabHelper::DidNavigateAnyFrame(
language_state_.DidNavigate(details);
}
-void TranslateTabHelper::OnLanguageDetermined(const std::string& language,
- bool page_translatable) {
- language_state_.LanguageDetermined(language, page_translatable);
+void TranslateTabHelper::OnLanguageDetermined(
+ const LanguageDetectionDetails& details,
+ bool page_translatable) {
+ language_state_.LanguageDetermined(details.adopted_language,
+ page_translatable);
- std::string lang = language;
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
content::Source<WebContents>(web_contents()),
- content::Details<std::string>(&lang));
+ content::Details<const LanguageDetectionDetails>(&details));
}
void TranslateTabHelper::OnPageTranslated(int32 page_id,

Powered by Google App Engine
This is Rietveld 408576698