| 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 <set> | 10 #include <set> |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 #include "chrome/browser/chrome_webusb_browser_client.h" | 260 #include "chrome/browser/chrome_webusb_browser_client.h" |
| 261 #include "components/webusb/webusb_detector.h" | 261 #include "components/webusb/webusb_detector.h" |
| 262 #endif | 262 #endif |
| 263 | 263 |
| 264 #if defined(MOJO_SHELL_CLIENT) | 264 #if defined(MOJO_SHELL_CLIENT) |
| 265 #include "chrome/browser/lifetime/application_lifetime.h" | 265 #include "chrome/browser/lifetime/application_lifetime.h" |
| 266 #include "content/public/common/mojo_shell_connection.h" | 266 #include "content/public/common/mojo_shell_connection.h" |
| 267 #include "services/shell/runner/common/client_util.h" | 267 #include "services/shell/runner/common/client_util.h" |
| 268 #endif | 268 #endif |
| 269 | 269 |
| 270 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) |
| 271 #include "chrome/browser/metrics/desktop_engagement_service.h" |
| 272 #endif |
| 273 |
| 270 using content::BrowserThread; | 274 using content::BrowserThread; |
| 271 | 275 |
| 272 namespace { | 276 namespace { |
| 273 | 277 |
| 274 // This function provides some ways to test crash and assertion handling | 278 // This function provides some ways to test crash and assertion handling |
| 275 // behavior of the program. | 279 // behavior of the program. |
| 276 void HandleTestParameters(const base::CommandLine& command_line) { | 280 void HandleTestParameters(const base::CommandLine& command_line) { |
| 277 // This parameter causes a null pointer crash (crash reporter trigger). | 281 // This parameter causes a null pointer crash (crash reporter trigger). |
| 278 if (command_line.HasSwitch(switches::kBrowserCrashTest)) { | 282 if (command_line.HasSwitch(switches::kBrowserCrashTest)) { |
| 279 int* bad_pointer = NULL; | 283 int* bad_pointer = NULL; |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 case version_info::Channel::BETA: | 783 case version_info::Channel::BETA: |
| 780 case version_info::Channel::STABLE: | 784 case version_info::Channel::STABLE: |
| 781 // Don't enable instrumentation. | 785 // Don't enable instrumentation. |
| 782 break; | 786 break; |
| 783 } | 787 } |
| 784 | 788 |
| 785 // Register a synthetic field trial for the sampling profiler configuration | 789 // Register a synthetic field trial for the sampling profiler configuration |
| 786 // that was already chosen. | 790 // that was already chosen. |
| 787 sampling_profiler_config_.RegisterSyntheticFieldTrial(); | 791 sampling_profiler_config_.RegisterSyntheticFieldTrial(); |
| 788 | 792 |
| 793 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) |
| 794 // Start the DesktopEngagementService. |
| 795 DesktopEngagementService::Initialize(); |
| 796 #endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) |
| 797 |
| 789 #if defined(OS_WIN) | 798 #if defined(OS_WIN) |
| 790 chrome_browser::SetupPreReadFieldTrial(); | 799 chrome_browser::SetupPreReadFieldTrial(); |
| 791 #endif // defined(OS_WIN) | 800 #endif // defined(OS_WIN) |
| 792 } | 801 } |
| 793 | 802 |
| 794 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- | 803 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- |
| 795 | 804 |
| 796 void ChromeBrowserMainParts::StartMetricsRecording() { | 805 void ChromeBrowserMainParts::StartMetricsRecording() { |
| 797 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); | 806 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); |
| 798 | 807 |
| (...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2034 chromeos::CrosSettings::Shutdown(); | 2043 chromeos::CrosSettings::Shutdown(); |
| 2035 #endif // defined(OS_CHROMEOS) | 2044 #endif // defined(OS_CHROMEOS) |
| 2036 #endif // defined(OS_ANDROID) | 2045 #endif // defined(OS_ANDROID) |
| 2037 } | 2046 } |
| 2038 | 2047 |
| 2039 // Public members: | 2048 // Public members: |
| 2040 | 2049 |
| 2041 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2050 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2042 chrome_extra_parts_.push_back(parts); | 2051 chrome_extra_parts_.push_back(parts); |
| 2043 } | 2052 } |
| OLD | NEW |