| 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 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 #include "chrome/browser/process_singleton.h" | 77 #include "chrome/browser/process_singleton.h" |
| 78 #include "chrome/browser/profiles/profile.h" | 78 #include "chrome/browser/profiles/profile.h" |
| 79 #include "chrome/browser/profiles/profile_manager.h" | 79 #include "chrome/browser/profiles/profile_manager.h" |
| 80 #include "chrome/browser/profiles/profiles_state.h" | 80 #include "chrome/browser/profiles/profiles_state.h" |
| 81 #include "chrome/browser/shell_integration.h" | 81 #include "chrome/browser/shell_integration.h" |
| 82 #include "chrome/browser/translate/translate_service.h" | 82 #include "chrome/browser/translate/translate_service.h" |
| 83 #include "chrome/browser/ui/app_list/app_list_service.h" | 83 #include "chrome/browser/ui/app_list/app_list_service.h" |
| 84 #include "chrome/browser/ui/browser.h" | 84 #include "chrome/browser/ui/browser.h" |
| 85 #include "chrome/browser/ui/browser_finder.h" | 85 #include "chrome/browser/ui/browser_finder.h" |
| 86 #include "chrome/browser/ui/host_desktop.h" | 86 #include "chrome/browser/ui/host_desktop.h" |
| 87 #include "chrome/browser/ui/infobar_constants.h" |
| 87 #include "chrome/browser/ui/startup/bad_flags_prompt.h" | 88 #include "chrome/browser/ui/startup/bad_flags_prompt.h" |
| 88 #include "chrome/browser/ui/startup/default_browser_prompt.h" | 89 #include "chrome/browser/ui/startup/default_browser_prompt.h" |
| 89 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 90 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 90 #include "chrome/browser/ui/uma_browsing_activity_observer.h" | 91 #include "chrome/browser/ui/uma_browsing_activity_observer.h" |
| 91 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 92 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 92 #include "chrome/common/chrome_constants.h" | 93 #include "chrome/common/chrome_constants.h" |
| 93 #include "chrome/common/chrome_paths.h" | 94 #include "chrome/common/chrome_paths.h" |
| 94 #include "chrome/common/chrome_result_codes.h" | 95 #include "chrome/common/chrome_result_codes.h" |
| 95 #include "chrome/common/chrome_switches.h" | 96 #include "chrome/common/chrome_switches.h" |
| 96 #include "chrome/common/chrome_version_info.h" | 97 #include "chrome/common/chrome_version_info.h" |
| 97 #include "chrome/common/crash_keys.h" | 98 #include "chrome/common/crash_keys.h" |
| 98 #include "chrome/common/env_vars.h" | 99 #include "chrome/common/env_vars.h" |
| 99 #include "chrome/common/logging_chrome.h" | 100 #include "chrome/common/logging_chrome.h" |
| 100 #include "chrome/common/net/net_resource_provider.h" | 101 #include "chrome/common/net/net_resource_provider.h" |
| 101 #include "chrome/common/pref_names.h" | 102 #include "chrome/common/pref_names.h" |
| 102 #include "chrome/common/profiling.h" | 103 #include "chrome/common/profiling.h" |
| 103 #include "chrome/grit/generated_resources.h" | 104 #include "chrome/grit/generated_resources.h" |
| 104 #include "chrome/installer/util/google_update_settings.h" | 105 #include "chrome/installer/util/google_update_settings.h" |
| 105 #include "components/component_updater/component_updater_service.h" | 106 #include "components/component_updater/component_updater_service.h" |
| 106 #include "components/google/core/browser/google_util.h" | 107 #include "components/google/core/browser/google_util.h" |
| 108 #include "components/infobars/core/infobar.h" |
| 107 #include "components/language_usage_metrics/language_usage_metrics.h" | 109 #include "components/language_usage_metrics/language_usage_metrics.h" |
| 108 #include "components/metrics/metrics_service.h" | 110 #include "components/metrics/metrics_service.h" |
| 109 #include "components/metrics/profiler/tracking_synchronizer.h" | 111 #include "components/metrics/profiler/tracking_synchronizer.h" |
| 110 #include "components/nacl/browser/nacl_browser.h" | 112 #include "components/nacl/browser/nacl_browser.h" |
| 111 #include "components/rappor/rappor_service.h" | 113 #include "components/rappor/rappor_service.h" |
| 112 #include "components/signin/core/common/profile_management_switches.h" | 114 #include "components/signin/core/common/profile_management_switches.h" |
| 113 #include "components/startup_metric_utils/startup_metric_utils.h" | 115 #include "components/startup_metric_utils/startup_metric_utils.h" |
| 114 #include "components/translate/content/browser/browser_cld_utils.h" | 116 #include "components/translate/content/browser/browser_cld_utils.h" |
| 115 #include "components/translate/content/common/cld_data_source.h" | 117 #include "components/translate/content/common/cld_data_source.h" |
| 116 #include "components/translate/core/browser/translate_download_manager.h" | 118 #include "components/translate/core/browser/translate_download_manager.h" |
| (...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 #endif // !defined(OS_ANDROID) | 1304 #endif // !defined(OS_ANDROID) |
| 1303 | 1305 |
| 1304 #if defined(ENABLE_BACKGROUND) | 1306 #if defined(ENABLE_BACKGROUND) |
| 1305 // Autoload any profiles which are running background apps. | 1307 // Autoload any profiles which are running background apps. |
| 1306 // TODO(rlp): Do this on a separate thread. See http://crbug.com/99075. | 1308 // TODO(rlp): Do this on a separate thread. See http://crbug.com/99075. |
| 1307 browser_process_->profile_manager()->AutoloadProfiles(); | 1309 browser_process_->profile_manager()->AutoloadProfiles(); |
| 1308 #endif | 1310 #endif |
| 1309 // Post-profile init --------------------------------------------------------- | 1311 // Post-profile init --------------------------------------------------------- |
| 1310 | 1312 |
| 1311 TranslateService::Initialize(); | 1313 TranslateService::Initialize(); |
| 1314 infobars::InfoBar::Initialize( |
| 1315 infobars::kDefaultBarTargetHeight, infobars::kSeparatorLineHeight, |
| 1316 infobars::kDefaultArrowTargetHeight, infobars::kMaximumArrowTargetHeight, |
| 1317 infobars::kDefaultArrowTargetHalfWidth, |
| 1318 infobars::kMaximumArrowTargetHalfWidth); |
| 1312 | 1319 |
| 1313 // Needs to be done before PostProfileInit, since login manager on CrOS is | 1320 // Needs to be done before PostProfileInit, since login manager on CrOS is |
| 1314 // called inside PostProfileInit. | 1321 // called inside PostProfileInit. |
| 1315 content::WebUIControllerFactory::RegisterFactory( | 1322 content::WebUIControllerFactory::RegisterFactory( |
| 1316 ChromeWebUIControllerFactory::GetInstance()); | 1323 ChromeWebUIControllerFactory::GetInstance()); |
| 1317 | 1324 |
| 1318 // NaClBrowserDelegateImpl is accessed inside PostProfileInit(). | 1325 // NaClBrowserDelegateImpl is accessed inside PostProfileInit(). |
| 1319 // So make sure to create it before that. | 1326 // So make sure to create it before that. |
| 1320 #if !defined(DISABLE_NACL) | 1327 #if !defined(DISABLE_NACL) |
| 1321 NaClBrowserDelegateImpl* delegate = | 1328 NaClBrowserDelegateImpl* delegate = |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 chromeos::CrosSettings::Shutdown(); | 1732 chromeos::CrosSettings::Shutdown(); |
| 1726 #endif | 1733 #endif |
| 1727 #endif | 1734 #endif |
| 1728 } | 1735 } |
| 1729 | 1736 |
| 1730 // Public members: | 1737 // Public members: |
| 1731 | 1738 |
| 1732 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1739 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1733 chrome_extra_parts_.push_back(parts); | 1740 chrome_extra_parts_.push_back(parts); |
| 1734 } | 1741 } |
| OLD | NEW |