| 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 650b8744550d13e90a31b29ad2ce5f23af16bb9c..0eb15dd28d443591df825ebd162e73b04a1da1d2 100644
|
| --- a/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| @@ -61,6 +61,7 @@
|
| #include "chrome/common/extensions/incognito_handler.h"
|
| #include "chrome/common/extensions/message_bundle.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"
|
| @@ -1925,8 +1926,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();
|
|
|
|
|