| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 #include "chrome/common/chrome_switches.h" | 108 #include "chrome/common/chrome_switches.h" |
| 109 #include "chrome/common/crash_keys.h" | 109 #include "chrome/common/crash_keys.h" |
| 110 #include "chrome/common/env_vars.h" | 110 #include "chrome/common/env_vars.h" |
| 111 #include "chrome/common/logging_chrome.h" | 111 #include "chrome/common/logging_chrome.h" |
| 112 #include "chrome/common/net/net_resource_provider.h" | 112 #include "chrome/common/net/net_resource_provider.h" |
| 113 #include "chrome/common/pref_names.h" | 113 #include "chrome/common/pref_names.h" |
| 114 #include "chrome/common/profiling.h" | 114 #include "chrome/common/profiling.h" |
| 115 #include "chrome/installer/util/google_update_settings.h" | 115 #include "chrome/installer/util/google_update_settings.h" |
| 116 #include "components/nacl/browser/nacl_browser.h" | 116 #include "components/nacl/browser/nacl_browser.h" |
| 117 #include "components/nacl/browser/nacl_process_host.h" | 117 #include "components/nacl/browser/nacl_process_host.h" |
| 118 #include "components/rappor/rappor_service.h" |
| 118 #include "components/startup_metric_utils/startup_metric_utils.h" | 119 #include "components/startup_metric_utils/startup_metric_utils.h" |
| 119 #include "content/public/browser/browser_thread.h" | 120 #include "content/public/browser/browser_thread.h" |
| 120 #include "content/public/browser/notification_observer.h" | 121 #include "content/public/browser/notification_observer.h" |
| 121 #include "content/public/browser/notification_registrar.h" | 122 #include "content/public/browser/notification_registrar.h" |
| 122 #include "content/public/browser/notification_service.h" | 123 #include "content/public/browser/notification_service.h" |
| 123 #include "content/public/browser/notification_types.h" | 124 #include "content/public/browser/notification_types.h" |
| 124 #include "content/public/browser/site_instance.h" | 125 #include "content/public/browser/site_instance.h" |
| 125 #include "content/public/common/content_client.h" | 126 #include "content/public/common/content_client.h" |
| 126 #include "content/public/common/content_switches.h" | 127 #include "content/public/common/content_switches.h" |
| 127 #include "content/public/common/main_function_params.h" | 128 #include "content/public/common/main_function_params.h" |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 } | 1121 } |
| 1121 #endif | 1122 #endif |
| 1122 | 1123 |
| 1123 // Android updates the metrics service dynamically depending on whether the | 1124 // Android updates the metrics service dynamically depending on whether the |
| 1124 // application is in the foreground or not. Do not start here. | 1125 // application is in the foreground or not. Do not start here. |
| 1125 #if !defined(OS_ANDROID) | 1126 #if !defined(OS_ANDROID) |
| 1126 // Now that the file thread has been started, start recording. | 1127 // Now that the file thread has been started, start recording. |
| 1127 StartMetricsRecording(); | 1128 StartMetricsRecording(); |
| 1128 #endif | 1129 #endif |
| 1129 | 1130 |
| 1131 browser_process_->rappor_service()->Start( |
| 1132 browser_process_->local_state(), |
| 1133 browser_process_->system_request_context()); |
| 1134 |
| 1130 // Create watchdog thread after creating all other threads because it will | 1135 // Create watchdog thread after creating all other threads because it will |
| 1131 // watch the other threads and they must be running. | 1136 // watch the other threads and they must be running. |
| 1132 browser_process_->watchdog_thread(); | 1137 browser_process_->watchdog_thread(); |
| 1133 | 1138 |
| 1134 // Do any initializating in the browser process that requires all threads | 1139 // Do any initializating in the browser process that requires all threads |
| 1135 // running. | 1140 // running. |
| 1136 browser_process_->PreMainMessageLoopRun(); | 1141 browser_process_->PreMainMessageLoopRun(); |
| 1137 | 1142 |
| 1138 // Record last shutdown time into a histogram. | 1143 // Record last shutdown time into a histogram. |
| 1139 browser_shutdown::ReadLastShutdownInfo(); | 1144 browser_shutdown::ReadLastShutdownInfo(); |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1719 chromeos::CrosSettings::Shutdown(); | 1724 chromeos::CrosSettings::Shutdown(); |
| 1720 #endif | 1725 #endif |
| 1721 #endif | 1726 #endif |
| 1722 } | 1727 } |
| 1723 | 1728 |
| 1724 // Public members: | 1729 // Public members: |
| 1725 | 1730 |
| 1726 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1731 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1727 chrome_extra_parts_.push_back(parts); | 1732 chrome_extra_parts_.push_back(parts); |
| 1728 } | 1733 } |
| OLD | NEW |