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

Unified Diff: ios/web_view/internal/translate/web_view_translate_ranker_factory.cc

Issue 2973173002: Fix crashes when using translate in incognito by overriding some methods. (Closed)
Patch Set: addressed ichikawa comments Created 3 years, 5 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
« no previous file with comments | « ios/web_view/internal/translate/web_view_translate_ranker_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/internal/translate/web_view_translate_ranker_factory.cc
diff --git a/ios/web_view/internal/translate/web_view_translate_ranker_factory.cc b/ios/web_view/internal/translate/web_view_translate_ranker_factory.cc
index 8c701968a8f4363484c736e59785cbc177f9c1cb..4efa9191724ca791b1f1e7abc365ce5ca88d794d 100644
--- a/ios/web_view/internal/translate/web_view_translate_ranker_factory.cc
+++ b/ios/web_view/internal/translate/web_view_translate_ranker_factory.cc
@@ -53,4 +53,10 @@ WebViewTranslateRankerFactory::BuildServiceInstanceFor(
return std::move(ranker);
}
+web::BrowserState* WebViewTranslateRankerFactory::GetBrowserStateToUse(
+ web::BrowserState* context) const {
+ // Override to enable this service for off the record browser states.
+ return context;
+}
+
} // namespace ios_web_view
« no previous file with comments | « ios/web_view/internal/translate/web_view_translate_ranker_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698