| 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) || \ |
| 271 (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 272 #include "chrome/browser/metrics/desktop_engagement/desktop_engagement_service.h
" |
| 273 #endif |
| 274 |
| 270 using content::BrowserThread; | 275 using content::BrowserThread; |
| 271 | 276 |
| 272 namespace { | 277 namespace { |
| 273 | 278 |
| 274 // This function provides some ways to test crash and assertion handling | 279 // This function provides some ways to test crash and assertion handling |
| 275 // behavior of the program. | 280 // behavior of the program. |
| 276 void HandleTestParameters(const base::CommandLine& command_line) { | 281 void HandleTestParameters(const base::CommandLine& command_line) { |
| 277 // This parameter causes a null pointer crash (crash reporter trigger). | 282 // This parameter causes a null pointer crash (crash reporter trigger). |
| 278 if (command_line.HasSwitch(switches::kBrowserCrashTest)) { | 283 if (command_line.HasSwitch(switches::kBrowserCrashTest)) { |
| 279 int* bad_pointer = NULL; | 284 int* bad_pointer = NULL; |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 case version_info::Channel::BETA: | 788 case version_info::Channel::BETA: |
| 784 case version_info::Channel::STABLE: | 789 case version_info::Channel::STABLE: |
| 785 // Don't enable instrumentation. | 790 // Don't enable instrumentation. |
| 786 break; | 791 break; |
| 787 } | 792 } |
| 788 | 793 |
| 789 // Register a synthetic field trial for the sampling profiler configuration | 794 // Register a synthetic field trial for the sampling profiler configuration |
| 790 // that was already chosen. | 795 // that was already chosen. |
| 791 sampling_profiler_config_.RegisterSyntheticFieldTrial(); | 796 sampling_profiler_config_.RegisterSyntheticFieldTrial(); |
| 792 | 797 |
| 798 #if defined(OS_WIN) || defined(OS_MACOSX) || \ |
| 799 (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 800 metrics::DesktopEngagementService::Initialize(); |
| 801 #endif |
| 802 |
| 793 #if defined(OS_WIN) | 803 #if defined(OS_WIN) |
| 794 chrome_browser::SetupPreReadFieldTrial(); | 804 chrome_browser::SetupPreReadFieldTrial(); |
| 795 #endif // defined(OS_WIN) | 805 #endif // defined(OS_WIN) |
| 796 } | 806 } |
| 797 | 807 |
| 798 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- | 808 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- |
| 799 | 809 |
| 800 void ChromeBrowserMainParts::StartMetricsRecording() { | 810 void ChromeBrowserMainParts::StartMetricsRecording() { |
| 801 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); | 811 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); |
| 802 | 812 |
| (...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2038 chromeos::CrosSettings::Shutdown(); | 2048 chromeos::CrosSettings::Shutdown(); |
| 2039 #endif // defined(OS_CHROMEOS) | 2049 #endif // defined(OS_CHROMEOS) |
| 2040 #endif // defined(OS_ANDROID) | 2050 #endif // defined(OS_ANDROID) |
| 2041 } | 2051 } |
| 2042 | 2052 |
| 2043 // Public members: | 2053 // Public members: |
| 2044 | 2054 |
| 2045 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2055 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2046 chrome_extra_parts_.push_back(parts); | 2056 chrome_extra_parts_.push_back(parts); |
| 2047 } | 2057 } |
| OLD | NEW |