| Index: components/translate/ios/browser/language_detection_controller.mm
|
| diff --git a/components/translate/ios/browser/language_detection_controller.mm b/components/translate/ios/browser/language_detection_controller.mm
|
| index 42922618e9b2f713afe4f2fa44e60f04adbb9b23..53fda593ac110e41e0598d2e511b2b323a19d5d9 100644
|
| --- a/components/translate/ios/browser/language_detection_controller.mm
|
| +++ b/components/translate/ios/browser/language_detection_controller.mm
|
| @@ -16,6 +16,7 @@
|
| #import "components/translate/ios/browser/js_language_detection_manager.h"
|
| #include "components/translate/ios/browser/string_clipping_util.h"
|
| #import "ios/web/public/url_scheme_util.h"
|
| +#include "ios/web/public/web_state/navigation_context.h"
|
| #include "ios/web/public/web_state/web_state.h"
|
|
|
| #if !defined(__has_feature) || !__has_feature(objc_arc)
|
| @@ -137,12 +138,10 @@ void LanguageDetectionController::PageLoaded(
|
| StartLanguageDetection();
|
| }
|
|
|
| -void LanguageDetectionController::UrlHashChanged() {
|
| - StartLanguageDetection();
|
| -}
|
| -
|
| -void LanguageDetectionController::HistoryStateChanged() {
|
| - StartLanguageDetection();
|
| +void LanguageDetectionController::DidFinishNavigation(
|
| + web::NavigationContext* navigation_context) {
|
| + if (navigation_context->IsSamePage())
|
| + StartLanguageDetection();
|
| }
|
|
|
| void LanguageDetectionController::WebStateDestroyed() {
|
|
|