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

Unified Diff: ios/web_view/internal/cwv_web_view_configuration.mm

Issue 2894483003: Initialize ios/web_view translate with a system-wide URLRequestContext. (Closed)
Patch Set: Cleanup. Created 3 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: ios/web_view/internal/cwv_web_view_configuration.mm
diff --git a/ios/web_view/internal/cwv_web_view_configuration.mm b/ios/web_view/internal/cwv_web_view_configuration.mm
index bd677f49a2b86c7fd42172b5fcd52758f9a42243..a9b3930f9dee96a48220f389440997e00cb065e7 100644
--- a/ios/web_view/internal/cwv_web_view_configuration.mm
+++ b/ios/web_view/internal/cwv_web_view_configuration.mm
@@ -9,11 +9,11 @@
#include "base/threading/thread_restrictions.h"
#include "components/translate/core/browser/translate_download_manager.h"
#include "ios/web/public/app/web_main.h"
+#include "ios/web_view/internal/app/application_context.h"
#import "ios/web_view/internal/cwv_user_content_controller_internal.h"
#import "ios/web_view/internal/web_view_browser_state.h"
#import "ios/web_view/internal/web_view_web_client.h"
#import "ios/web_view/internal/web_view_web_main_delegate.h"
-#include "ui/base/l10n/l10n_util_mac.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -69,15 +69,6 @@
if (self) {
_browserState = std::move(browserState);
- // Initialize translate.
- translate::TranslateDownloadManager* downloadManager =
- translate::TranslateDownloadManager::GetInstance();
- // TODO(crbug.com/710948): Use global request context here.
- downloadManager->set_request_context(_browserState->GetRequestContext());
- // TODO(crbug.com/679895): Bring up application locale correctly.
- downloadManager->set_application_locale(l10n_util::GetLocaleOverride());
- downloadManager->language_list()->SetResourceRequestsAllowed(true);
-
_userContentController =
[[CWVUserContentController alloc] initWithConfiguration:self];
}

Powered by Google App Engine
This is Rietveld 408576698