| OLD | NEW |
| 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 Loading... |
| 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 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1545 // Call Recycle() here as late as possible, before going into the loop | 1545 // Call Recycle() here as late as possible, before going into the loop |
| 1546 // because Start() will add things to it while creating the main window. | 1546 // because Start() will add things to it while creating the main window. |
| 1547 if (parameters().autorelease_pool) | 1547 if (parameters().autorelease_pool) |
| 1548 parameters().autorelease_pool->Recycle(); | 1548 parameters().autorelease_pool->Recycle(); |
| 1549 #endif | 1549 #endif |
| 1550 | 1550 |
| 1551 base::TimeDelta delay = base::TimeTicks::Now() - browser_open_start; | 1551 base::TimeDelta delay = base::TimeTicks::Now() - browser_open_start; |
| 1552 UMA_HISTOGRAM_LONG_TIMES_100("Startup.BrowserOpenTabs", delay); | 1552 UMA_HISTOGRAM_LONG_TIMES_100("Startup.BrowserOpenTabs", delay); |
| 1553 | 1553 |
| 1554 // If we're running tests (ui_task is non-null), then we don't want to | 1554 // If we're running tests (ui_task is non-null), then we don't want to |
| 1555 // call FetchLanguageListFromTranslateServer or | 1555 // call RequestLanguageList or StartRepeatedVariationsSeedFetch. |
| 1556 // StartRepeatedVariationsSeedFetch. | |
| 1557 if (parameters().ui_task == NULL) { | 1556 if (parameters().ui_task == NULL) { |
| 1558 // Request new variations seed information from server. | 1557 // Request new variations seed information from server. |
| 1559 chrome_variations::VariationsService* variations_service = | 1558 chrome_variations::VariationsService* variations_service = |
| 1560 browser_process_->variations_service(); | 1559 browser_process_->variations_service(); |
| 1561 if (variations_service) { | 1560 if (variations_service) { |
| 1562 variations_service->StartRepeatedVariationsSeedFetch(); | 1561 variations_service->StartRepeatedVariationsSeedFetch(); |
| 1563 | 1562 |
| 1564 #if defined(OS_WIN) | 1563 #if defined(OS_WIN) |
| 1565 variations_service->StartGoogleUpdateRegistrySync(); | 1564 variations_service->StartGoogleUpdateRegistrySync(); |
| 1566 #endif | 1565 #endif |
| 1567 } | 1566 } |
| 1568 | 1567 |
| 1569 TranslateManager::GetInstance()->FetchLanguageListFromTranslateServer( | 1568 TranslateDownloadManager::RequestLanguageList(profile_->GetPrefs()); |
| 1570 profile_->GetPrefs()); | |
| 1571 } | 1569 } |
| 1572 | 1570 |
| 1573 run_message_loop_ = true; | 1571 run_message_loop_ = true; |
| 1574 } else { | 1572 } else { |
| 1575 run_message_loop_ = false; | 1573 run_message_loop_ = false; |
| 1576 } | 1574 } |
| 1577 browser_creator_.reset(); | 1575 browser_creator_.reset(); |
| 1578 #endif // !defined(OS_ANDROID) | 1576 #endif // !defined(OS_ANDROID) |
| 1579 | 1577 |
| 1580 performance_monitor::PerformanceMonitor::GetInstance()->Initialize(); | 1578 performance_monitor::PerformanceMonitor::GetInstance()->Initialize(); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1704 chromeos::CrosSettings::Shutdown(); | 1702 chromeos::CrosSettings::Shutdown(); |
| 1705 #endif | 1703 #endif |
| 1706 #endif | 1704 #endif |
| 1707 } | 1705 } |
| 1708 | 1706 |
| 1709 // Public members: | 1707 // Public members: |
| 1710 | 1708 |
| 1711 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1709 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1712 chrome_extra_parts_.push_back(parts); | 1710 chrome_extra_parts_.push_back(parts); |
| 1713 } | 1711 } |
| OLD | NEW |