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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 143003020: Move TranslateLanguageList to the Translate component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@removeDelegate
Patch Set: gn build Created 6 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 #include "chrome/browser/prefs/pref_metrics_service.h" 83 #include "chrome/browser/prefs/pref_metrics_service.h"
84 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 84 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
85 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" 85 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h"
86 #include "chrome/browser/process_singleton.h" 86 #include "chrome/browser/process_singleton.h"
87 #include "chrome/browser/profiles/profile.h" 87 #include "chrome/browser/profiles/profile.h"
88 #include "chrome/browser/profiles/profile_impl.h" 88 #include "chrome/browser/profiles/profile_impl.h"
89 #include "chrome/browser/profiles/profile_manager.h" 89 #include "chrome/browser/profiles/profile_manager.h"
90 #include "chrome/browser/profiles/profiles_state.h" 90 #include "chrome/browser/profiles/profiles_state.h"
91 #include "chrome/browser/shell_integration.h" 91 #include "chrome/browser/shell_integration.h"
92 #include "chrome/browser/three_d_api_observer.h" 92 #include "chrome/browser/three_d_api_observer.h"
93 #include "chrome/browser/translate/translate_manager.h"
94 #include "chrome/browser/translate/translate_service.h" 93 #include "chrome/browser/translate/translate_service.h"
95 #include "chrome/browser/ui/app_list/app_list_service.h" 94 #include "chrome/browser/ui/app_list/app_list_service.h"
96 #include "chrome/browser/ui/browser.h" 95 #include "chrome/browser/ui/browser.h"
97 #include "chrome/browser/ui/browser_finder.h" 96 #include "chrome/browser/ui/browser_finder.h"
98 #include "chrome/browser/ui/host_desktop.h" 97 #include "chrome/browser/ui/host_desktop.h"
99 #include "chrome/browser/ui/startup/default_browser_prompt.h" 98 #include "chrome/browser/ui/startup/default_browser_prompt.h"
100 #include "chrome/browser/ui/startup/startup_browser_creator.h" 99 #include "chrome/browser/ui/startup/startup_browser_creator.h"
101 #include "chrome/browser/ui/uma_browsing_activity_observer.h" 100 #include "chrome/browser/ui/uma_browsing_activity_observer.h"
102 #include "chrome/browser/ui/user_data_dir_dialog.h" 101 #include "chrome/browser/ui/user_data_dir_dialog.h"
103 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 102 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
104 #include "chrome/browser/user_data_dir_extractor.h" 103 #include "chrome/browser/user_data_dir_extractor.h"
105 #include "chrome/common/chrome_constants.h" 104 #include "chrome/common/chrome_constants.h"
106 #include "chrome/common/chrome_paths.h" 105 #include "chrome/common/chrome_paths.h"
107 #include "chrome/common/chrome_result_codes.h" 106 #include "chrome/common/chrome_result_codes.h"
108 #include "chrome/common/chrome_switches.h" 107 #include "chrome/common/chrome_switches.h"
109 #include "chrome/common/crash_keys.h" 108 #include "chrome/common/crash_keys.h"
110 #include "chrome/common/env_vars.h" 109 #include "chrome/common/env_vars.h"
111 #include "chrome/common/logging_chrome.h" 110 #include "chrome/common/logging_chrome.h"
112 #include "chrome/common/net/net_resource_provider.h" 111 #include "chrome/common/net/net_resource_provider.h"
113 #include "chrome/common/pref_names.h" 112 #include "chrome/common/pref_names.h"
114 #include "chrome/common/profile_management_switches.h" 113 #include "chrome/common/profile_management_switches.h"
115 #include "chrome/common/profiling.h" 114 #include "chrome/common/profiling.h"
116 #include "chrome/installer/util/google_update_settings.h" 115 #include "chrome/installer/util/google_update_settings.h"
117 #include "components/language_usage_metrics/language_usage_metrics.h" 116 #include "components/language_usage_metrics/language_usage_metrics.h"
118 #include "components/nacl/browser/nacl_browser.h" 117 #include "components/nacl/browser/nacl_browser.h"
119 #include "components/nacl/browser/nacl_process_host.h" 118 #include "components/nacl/browser/nacl_process_host.h"
120 #include "components/startup_metric_utils/startup_metric_utils.h" 119 #include "components/startup_metric_utils/startup_metric_utils.h"
120 #include "components/translate/core/browser/translate_download_manager.h"
121 #include "content/public/browser/browser_thread.h" 121 #include "content/public/browser/browser_thread.h"
122 #include "content/public/browser/notification_observer.h" 122 #include "content/public/browser/notification_observer.h"
123 #include "content/public/browser/notification_registrar.h" 123 #include "content/public/browser/notification_registrar.h"
124 #include "content/public/browser/notification_service.h" 124 #include "content/public/browser/notification_service.h"
125 #include "content/public/browser/notification_types.h" 125 #include "content/public/browser/notification_types.h"
126 #include "content/public/browser/site_instance.h" 126 #include "content/public/browser/site_instance.h"
127 #include "content/public/common/content_client.h" 127 #include "content/public/common/content_client.h"
128 #include "content/public/common/content_switches.h" 128 #include "content/public/common/content_switches.h"
129 #include "content/public/common/main_function_params.h" 129 #include "content/public/common/main_function_params.h"
130 #include "extensions/browser/extension_system.h" 130 #include "extensions/browser/extension_system.h"
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 // Call Recycle() here as late as possible, before going into the loop 1537 // Call Recycle() here as late as possible, before going into the loop
1538 // because Start() will add things to it while creating the main window. 1538 // because Start() will add things to it while creating the main window.
1539 if (parameters().autorelease_pool) 1539 if (parameters().autorelease_pool)
1540 parameters().autorelease_pool->Recycle(); 1540 parameters().autorelease_pool->Recycle();
1541 #endif 1541 #endif
1542 1542
1543 base::TimeDelta delay = base::TimeTicks::Now() - browser_open_start; 1543 base::TimeDelta delay = base::TimeTicks::Now() - browser_open_start;
1544 UMA_HISTOGRAM_LONG_TIMES_100("Startup.BrowserOpenTabs", delay); 1544 UMA_HISTOGRAM_LONG_TIMES_100("Startup.BrowserOpenTabs", delay);
1545 1545
1546 // If we're running tests (ui_task is non-null), then we don't want to 1546 // If we're running tests (ui_task is non-null), then we don't want to
1547 // call FetchLanguageListFromTranslateServer or 1547 // call RequestLanguageList or StartRepeatedVariationsSeedFetch.
1548 // StartRepeatedVariationsSeedFetch.
1549 if (parameters().ui_task == NULL) { 1548 if (parameters().ui_task == NULL) {
1550 // Request new variations seed information from server. 1549 // Request new variations seed information from server.
1551 chrome_variations::VariationsService* variations_service = 1550 chrome_variations::VariationsService* variations_service =
1552 browser_process_->variations_service(); 1551 browser_process_->variations_service();
1553 if (variations_service) { 1552 if (variations_service) {
1554 variations_service->StartRepeatedVariationsSeedFetch(); 1553 variations_service->StartRepeatedVariationsSeedFetch();
1555 1554
1556 #if defined(OS_WIN) 1555 #if defined(OS_WIN)
1557 variations_service->StartGoogleUpdateRegistrySync(); 1556 variations_service->StartGoogleUpdateRegistrySync();
1558 #endif 1557 #endif
1559 } 1558 }
1560 1559
1561 TranslateManager::GetInstance()->FetchLanguageListFromTranslateServer( 1560 TranslateDownloadManager::RequestLanguageList(profile_->GetPrefs());
1562 profile_->GetPrefs());
1563 } 1561 }
1564 1562
1565 run_message_loop_ = true; 1563 run_message_loop_ = true;
1566 } else { 1564 } else {
1567 run_message_loop_ = false; 1565 run_message_loop_ = false;
1568 } 1566 }
1569 browser_creator_.reset(); 1567 browser_creator_.reset();
1570 #endif // !defined(OS_ANDROID) 1568 #endif // !defined(OS_ANDROID)
1571 1569
1572 performance_monitor::PerformanceMonitor::GetInstance()->Initialize(); 1570 performance_monitor::PerformanceMonitor::GetInstance()->Initialize();
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 chromeos::CrosSettings::Shutdown(); 1694 chromeos::CrosSettings::Shutdown();
1697 #endif 1695 #endif
1698 #endif 1696 #endif
1699 } 1697 }
1700 1698
1701 // Public members: 1699 // Public members:
1702 1700
1703 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1701 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1704 chrome_extra_parts_.push_back(parts); 1702 chrome_extra_parts_.push_back(parts);
1705 } 1703 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698