| 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 <stddef.h> | 7 #include <stddef.h> | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <map> | 10 #include <map> | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 57 #include "chrome/browser/component_updater/pepper_flash_component_installer.h" | 57 #include "chrome/browser/component_updater/pepper_flash_component_installer.h" | 
| 58 #include "chrome/browser/component_updater/recovery_component_installer.h" | 58 #include "chrome/browser/component_updater/recovery_component_installer.h" | 
| 59 #include "chrome/browser/component_updater/sth_set_component_installer.h" | 59 #include "chrome/browser/component_updater/sth_set_component_installer.h" | 
| 60 #include "chrome/browser/component_updater/subresource_filter_component_installe
      r.h" | 60 #include "chrome/browser/component_updater/subresource_filter_component_installe
      r.h" | 
| 61 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h
      " | 61 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h
      " | 
| 62 #include "chrome/browser/component_updater/swiftshader_component_installer.h" | 62 #include "chrome/browser/component_updater/swiftshader_component_installer.h" | 
| 63 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" | 63 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" | 
| 64 #include "chrome/browser/defaults.h" | 64 #include "chrome/browser/defaults.h" | 
| 65 #include "chrome/browser/first_run/first_run.h" | 65 #include "chrome/browser/first_run/first_run.h" | 
| 66 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 66 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 
| 67 #include "chrome/browser/google/google_brand.h" |  | 
| 68 #include "chrome/browser/gpu/gpu_profile_cache.h" | 67 #include "chrome/browser/gpu/gpu_profile_cache.h" | 
| 69 #include "chrome/browser/gpu/three_d_api_observer.h" | 68 #include "chrome/browser/gpu/three_d_api_observer.h" | 
| 70 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" | 69 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" | 
| 71 #include "chrome/browser/memory/tab_manager.h" | 70 #include "chrome/browser/memory/tab_manager.h" | 
| 72 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" | 71 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" | 
| 73 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 72 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 
| 74 #include "chrome/browser/metrics/thread_watcher.h" | 73 #include "chrome/browser/metrics/thread_watcher.h" | 
| 75 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 74 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 
| 76 #include "chrome/browser/net/crl_set_fetcher.h" | 75 #include "chrome/browser/net/crl_set_fetcher.h" | 
| 77 #include "chrome/browser/performance_monitor/performance_monitor.h" | 76 #include "chrome/browser/performance_monitor/performance_monitor.h" | 
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 982 | 981 | 
| 983   // Create an instance of GpuModeManager to watch gpu mode pref change. | 982   // Create an instance of GpuModeManager to watch gpu mode pref change. | 
| 984   g_browser_process->gpu_mode_manager(); | 983   g_browser_process->gpu_mode_manager(); | 
| 985 | 984 | 
| 986   return result_code_; | 985   return result_code_; | 
| 987 } | 986 } | 
| 988 | 987 | 
| 989 int ChromeBrowserMainParts::PreCreateThreadsImpl() { | 988 int ChromeBrowserMainParts::PreCreateThreadsImpl() { | 
| 990   TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreCreateThreadsImpl") | 989   TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreCreateThreadsImpl") | 
| 991   run_message_loop_ = false; | 990   run_message_loop_ = false; | 
| 992 |  | 
| 993 // Record whether the machine is domain joined (Win only) in a crash key. This |  | 
| 994 // will be used to better identify whether crashes are from enterprise users. |  | 
| 995 #if defined(OS_WIN) |  | 
| 996   base::debug::SetCrashKeyValue(crash_keys::kEnrolledToDomain, |  | 
| 997                                 base::win::IsEnrolledToDomain() ? "yes" : "no"); |  | 
| 998 #endif |  | 
| 999 |  | 
| 1000 #if !defined(OS_ANDROID) | 991 #if !defined(OS_ANDROID) | 
| 1001   chrome::MaybeShowInvalidUserDataDirWarningDialog(); | 992   chrome::MaybeShowInvalidUserDataDirWarningDialog(); | 
| 1002 #endif  // !defined(OS_ANDROID) | 993 #endif  // !defined(OS_ANDROID) | 
| 1003   if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_)) | 994   if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_)) | 
| 1004     return chrome::RESULT_CODE_MISSING_DATA; | 995     return chrome::RESULT_CODE_MISSING_DATA; | 
| 1005 | 996 | 
| 1006   // Force MediaCaptureDevicesDispatcher to be created on UI thread. | 997   // Force MediaCaptureDevicesDispatcher to be created on UI thread. | 
| 1007   MediaCaptureDevicesDispatcher::GetInstance(); | 998   MediaCaptureDevicesDispatcher::GetInstance(); | 
| 1008 | 999 | 
| 1009   // Android's first run is done in Java instead of native. | 1000   // Android's first run is done in Java instead of native. | 
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2129   chromeos::CrosSettings::Shutdown(); | 2120   chromeos::CrosSettings::Shutdown(); | 
| 2130 #endif  // defined(OS_CHROMEOS) | 2121 #endif  // defined(OS_CHROMEOS) | 
| 2131 #endif  // defined(OS_ANDROID) | 2122 #endif  // defined(OS_ANDROID) | 
| 2132 } | 2123 } | 
| 2133 | 2124 | 
| 2134 // Public members: | 2125 // Public members: | 
| 2135 | 2126 | 
| 2136 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2127 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 
| 2137   chrome_extra_parts_.push_back(parts); | 2128   chrome_extra_parts_.push_back(parts); | 
| 2138 } | 2129 } | 
| OLD | NEW | 
|---|