| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "chrome/browser/component_updater/component_updater_service.h" | 48 #include "chrome/browser/component_updater/component_updater_service.h" |
| 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/startup_helper.h" | 57 #include "chrome/browser/extensions/startup_helper.h" |
| 58 #include "chrome/browser/feedback/feedback_profile_observer.h" |
| 58 #include "chrome/browser/first_run/first_run.h" | 59 #include "chrome/browser/first_run/first_run.h" |
| 59 #include "chrome/browser/first_run/upgrade_util.h" | 60 #include "chrome/browser/first_run/upgrade_util.h" |
| 60 #include "chrome/browser/google/google_search_counter.h" | 61 #include "chrome/browser/google/google_search_counter.h" |
| 61 #include "chrome/browser/google/google_util.h" | 62 #include "chrome/browser/google/google_util.h" |
| 62 #include "chrome/browser/gpu/gl_string_manager.h" | 63 #include "chrome/browser/gpu/gl_string_manager.h" |
| 63 #include "chrome/browser/jankometer.h" | 64 #include "chrome/browser/jankometer.h" |
| 64 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 65 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 65 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 66 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
| 66 #include "chrome/browser/metrics/metrics_log.h" | 67 #include "chrome/browser/metrics/metrics_log.h" |
| 67 #include "chrome/browser/metrics/metrics_service.h" | 68 #include "chrome/browser/metrics/metrics_service.h" |
| (...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 // ... additional setup, including CreateProfile() | 1032 // ... additional setup, including CreateProfile() |
| 1032 // PostProfileInit() | 1033 // PostProfileInit() |
| 1033 // ... additional setup | 1034 // ... additional setup |
| 1034 // PreBrowserStart() | 1035 // PreBrowserStart() |
| 1035 // ... browser_creator_->Start (OR parameters().ui_task->Run()) | 1036 // ... browser_creator_->Start (OR parameters().ui_task->Run()) |
| 1036 // PostBrowserStart() | 1037 // PostBrowserStart() |
| 1037 | 1038 |
| 1038 void ChromeBrowserMainParts::PreProfileInit() { | 1039 void ChromeBrowserMainParts::PreProfileInit() { |
| 1039 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreProfileInit"); | 1040 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreProfileInit"); |
| 1040 | 1041 |
| 1042 // Initialize the feedback uploader so it can setup notifications for profile |
| 1043 // creation. |
| 1044 feedback::FeedbackProfileObserver::Initialize(); |
| 1045 |
| 1041 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 1046 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
| 1042 chrome_extra_parts_[i]->PreProfileInit(); | 1047 chrome_extra_parts_[i]->PreProfileInit(); |
| 1043 | 1048 |
| 1044 #if !defined(OS_ANDROID) | 1049 #if !defined(OS_ANDROID) |
| 1045 ProfileManager* profile_manager = g_browser_process->profile_manager(); | 1050 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
| 1046 | 1051 |
| 1047 // First check if any ephemeral profiles are left behind because of browser | 1052 // First check if any ephemeral profiles are left behind because of browser |
| 1048 // crash and schedule them for deletion and then proceed with getting the set | 1053 // crash and schedule them for deletion and then proceed with getting the set |
| 1049 // of profiles to open. | 1054 // of profiles to open. |
| 1050 ProfileInfoCache& profile_cache = profile_manager->GetProfileInfoCache(); | 1055 ProfileInfoCache& profile_cache = profile_manager->GetProfileInfoCache(); |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1696 chromeos::CrosSettings::Shutdown(); | 1701 chromeos::CrosSettings::Shutdown(); |
| 1697 #endif | 1702 #endif |
| 1698 #endif | 1703 #endif |
| 1699 } | 1704 } |
| 1700 | 1705 |
| 1701 // Public members: | 1706 // Public members: |
| 1702 | 1707 |
| 1703 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1708 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1704 chrome_extra_parts_.push_back(parts); | 1709 chrome_extra_parts_.push_back(parts); |
| 1705 } | 1710 } |
| OLD | NEW |