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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.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: (Rebasing) 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/extensions/api/tabs/tabs_api.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index 57a49151cba20ccddda4d123fcf6e49212c1016d..3370ee81751015d9b81101baf6948b6632b401e4 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -62,6 +62,7 @@
#include "chrome/common/extensions/message_bundle.h"
#include "chrome/common/extensions/permissions/permissions_data.h"
#include "chrome/common/extensions/user_script.h"
+#include "chrome/common/language_detection_details.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "components/user_prefs/pref_registry_syncable.h"
@@ -1936,8 +1937,11 @@ void TabsDetectLanguageFunction::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
std::string language;
- if (type == chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED)
- language = *content::Details<std::string>(details).ptr();
+ if (type == chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED) {
+ const LanguageDetectionDetails* lang_det_details =
+ content::Details<const LanguageDetectionDetails>(details).ptr();
+ language = lang_det_details->adopted_language;
+ }
registrar_.RemoveAll();
« no previous file with comments | « chrome/browser/autofill/autofill_browsertest.cc ('k') | chrome/browser/resources/translate_internals/detection_logs.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698