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

Unified Diff: chrome/browser/browser_main.cc

Issue 7171002: Get the list of supported languages from the translate server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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: chrome/browser/browser_main.cc
===================================================================
--- chrome/browser/browser_main.cc (revision 88995)
+++ chrome/browser/browser_main.cc (working copy)
@@ -1640,7 +1640,12 @@
return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS;
// Create the TranslateManager singleton.
- TranslateManager::GetInstance();
+ TranslateManager* translate_manager = TranslateManager::GetInstance();
+ DCHECK(translate_manager != NULL);
+ // If we're running tests (ui_task is non-null), then we don't want to
+ // call FetchLanguageListFromTranslateServer
+ if (parameters.ui_task == NULL && translate_manager != NULL)
+ translate_manager->FetchLanguageListFromTranslateServer(user_prefs);
#if defined(OS_MACOSX)
if (!parsed_command_line.HasSwitch(switches::kNoFirstRun)) {
« no previous file with comments | « no previous file | chrome/browser/translate/translate_manager.h » ('j') | chrome/browser/translate/translate_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698