| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #include "chrome/browser/component_updater/flash_component_installer.h" | 49 #include "chrome/browser/component_updater/flash_component_installer.h" |
| 50 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" | 50 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" |
| 51 #include "chrome/browser/component_updater/recovery_component_installer.h" | 51 #include "chrome/browser/component_updater/recovery_component_installer.h" |
| 52 #include "chrome/browser/component_updater/swiftshader_component_installer.h" | 52 #include "chrome/browser/component_updater/swiftshader_component_installer.h" |
| 53 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" | 53 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" |
| 54 #include "chrome/browser/defaults.h" | 54 #include "chrome/browser/defaults.h" |
| 55 #include "chrome/browser/extensions/extension_protocols.h" | 55 #include "chrome/browser/extensions/extension_protocols.h" |
| 56 #include "chrome/browser/extensions/extension_service.h" | 56 #include "chrome/browser/extensions/extension_service.h" |
| 57 #include "chrome/browser/extensions/extension_system.h" | 57 #include "chrome/browser/extensions/extension_system.h" |
| 58 #include "chrome/browser/extensions/startup_helper.h" | 58 #include "chrome/browser/extensions/startup_helper.h" |
| 59 #include "chrome/browser/feedback/feedback_profile_observer.h" |
| 59 #include "chrome/browser/first_run/first_run.h" | 60 #include "chrome/browser/first_run/first_run.h" |
| 60 #include "chrome/browser/first_run/upgrade_util.h" | 61 #include "chrome/browser/first_run/upgrade_util.h" |
| 61 #include "chrome/browser/google/google_search_counter.h" | 62 #include "chrome/browser/google/google_search_counter.h" |
| 62 #include "chrome/browser/google/google_util.h" | 63 #include "chrome/browser/google/google_util.h" |
| 63 #include "chrome/browser/gpu/gl_string_manager.h" | 64 #include "chrome/browser/gpu/gl_string_manager.h" |
| 64 #include "chrome/browser/jankometer.h" | 65 #include "chrome/browser/jankometer.h" |
| 65 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 66 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 66 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 67 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
| 67 #include "chrome/browser/metrics/metrics_log.h" | 68 #include "chrome/browser/metrics/metrics_log.h" |
| 68 #include "chrome/browser/metrics/metrics_service.h" | 69 #include "chrome/browser/metrics/metrics_service.h" |
| (...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 if (ShellIntegration::CanSetAsDefaultBrowser() == | 1224 if (ShellIntegration::CanSetAsDefaultBrowser() == |
| 1224 ShellIntegration::SET_DEFAULT_UNATTENDED) | 1225 ShellIntegration::SET_DEFAULT_UNATTENDED) |
| 1225 ShellIntegration::SetAsDefaultBrowser(); | 1226 ShellIntegration::SetAsDefaultBrowser(); |
| 1226 } | 1227 } |
| 1227 #else | 1228 #else |
| 1228 // We don't support retention experiments on Mac or Linux. | 1229 // We don't support retention experiments on Mac or Linux. |
| 1229 return content::RESULT_CODE_NORMAL_EXIT; | 1230 return content::RESULT_CODE_NORMAL_EXIT; |
| 1230 #endif // defined(OS_WIN) | 1231 #endif // defined(OS_WIN) |
| 1231 } | 1232 } |
| 1232 | 1233 |
| 1234 // Initialize the feedback uploader so it can setup notifications for profile |
| 1235 // creation. |
| 1236 feedback::FeedbackProfileObserver::Initialize(); |
| 1237 |
| 1233 // Profile creation ---------------------------------------------------------- | 1238 // Profile creation ---------------------------------------------------------- |
| 1234 | 1239 |
| 1235 MetricsService::SetExecutionPhase(MetricsService::CREATE_PROFILE); | 1240 MetricsService::SetExecutionPhase(MetricsService::CREATE_PROFILE); |
| 1236 profile_ = CreatePrimaryProfile(parameters(), | 1241 profile_ = CreatePrimaryProfile(parameters(), |
| 1237 user_data_dir_, | 1242 user_data_dir_, |
| 1238 parsed_command_line()); | 1243 parsed_command_line()); |
| 1239 if (!profile_) | 1244 if (!profile_) |
| 1240 return content::RESULT_CODE_NORMAL_EXIT; | 1245 return content::RESULT_CODE_NORMAL_EXIT; |
| 1241 | 1246 |
| 1242 #if defined(ENABLE_BACKGROUND) | 1247 #if defined(ENABLE_BACKGROUND) |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 chromeos::CrosSettings::Shutdown(); | 1687 chromeos::CrosSettings::Shutdown(); |
| 1683 #endif | 1688 #endif |
| 1684 #endif | 1689 #endif |
| 1685 } | 1690 } |
| 1686 | 1691 |
| 1687 // Public members: | 1692 // Public members: |
| 1688 | 1693 |
| 1689 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1694 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1690 chrome_extra_parts_.push_back(parts); | 1695 chrome_extra_parts_.push_back(parts); |
| 1691 } | 1696 } |
| OLD | NEW |