Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / translate / translate_ui_delegate.cc
index 8ae4d7e..c9114b7 100644 (file)
@@ -9,8 +9,9 @@
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/translate/translate_manager.h"
-#include "chrome/browser/translate/translate_prefs.h"
 #include "chrome/browser/translate/translate_tab_helper.h"
+#include "components/translate/core/browser/translate_download_manager.h"
+#include "components/translate/core/browser/translate_prefs.h"
 #include "components/translate/core/common/translate_constants.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/navigation_entry.h"
@@ -43,7 +44,7 @@ TranslateUIDelegate::TranslateUIDelegate(content::WebContents* web_contents,
   DCHECK(web_contents_);
 
   std::vector<std::string> language_codes;
-  TranslateManager::GetSupportedLanguages(&language_codes);
+  TranslateDownloadManager::GetSupportedLanguages(&language_codes);
 
   // Preparing for the alphabetical order in the locale.
   UErrorCode error = U_ZERO_ERROR;
@@ -82,7 +83,7 @@ TranslateUIDelegate::TranslateUIDelegate(content::WebContents* web_contents,
 
   Profile* profile =
       Profile::FromBrowserContext(web_contents_->GetBrowserContext());
-  prefs_.reset(new TranslatePrefs(profile->GetPrefs()));
+  prefs_ = TranslateTabHelper::CreateTranslatePrefs(profile->GetPrefs());
 }
 
 TranslateUIDelegate::~TranslateUIDelegate() {