Index: components/translate/core/browser/translate_download_manager.cc |
diff --git a/components/translate/core/browser/translate_download_manager.cc b/components/translate/core/browser/translate_download_manager.cc |
index a431403e700b807ef07a27320d4b68ad958f74a8..88c01777409bc1943e92387aa82a75b895c43b2d 100644 |
--- a/components/translate/core/browser/translate_download_manager.cc |
+++ b/components/translate/core/browser/translate_download_manager.cc |
@@ -4,7 +4,6 @@ |
#include "components/translate/core/browser/translate_download_manager.h" |
-#include "base/command_line.h" |
#include "base/logging.h" |
#include "base/memory/singleton.h" |
#include "components/prefs/pref_service.h" |
@@ -31,30 +30,21 @@ void TranslateDownloadManager::Shutdown() { |
} |
// static |
-void TranslateDownloadManager::RequestLanguageList() { |
+void TranslateDownloadManager::RequestLanguageList(PrefService* prefs) { |
+ // We don't want to do this when translate is disabled. |
+ DCHECK(prefs != NULL); |
+ if (!prefs->GetBoolean(prefs::kEnableTranslate)) |
+ return; |
+ |
TranslateLanguageList* language_list = GetInstance()->language_list(); |
if (!language_list) { |
NOTREACHED(); |
return; |
} |
- |
language_list->RequestLanguageList(); |
} |
// static |
-void TranslateDownloadManager::RequestLanguageList(PrefService* prefs) { |
- // We don't want to do this when translate is disabled. |
- DCHECK(prefs != NULL); |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- translate::switches::kDisableTranslate) || |
- !prefs->GetBoolean(prefs::kEnableTranslate)) { |
- return; |
- } |
- |
- RequestLanguageList(); |
-} |
- |
-// static |
void TranslateDownloadManager::GetSupportedLanguages( |
std::vector<std::string>* languages) { |
TranslateLanguageList* language_list = GetInstance()->language_list(); |