Chromium Code Reviews| 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/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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 783 case version_info::Channel::BETA: | 787 case version_info::Channel::BETA: |
| 784 case version_info::Channel::STABLE: | 788 case version_info::Channel::STABLE: |
| 785 // Don't enable instrumentation. | 789 // Don't enable instrumentation. |
| 786 break; | 790 break; |
| 787 } | 791 } |
| 788 | 792 |
| 789 // Register a synthetic field trial for the sampling profiler configuration | 793 // Register a synthetic field trial for the sampling profiler configuration |
| 790 // that was already chosen. | 794 // that was already chosen. |
| 791 sampling_profiler_config_.RegisterSyntheticFieldTrial(); | 795 sampling_profiler_config_.RegisterSyntheticFieldTrial(); |
| 792 | 796 |
| 797 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) | |
| 798 // Start the DesktopEngagementService. | |
|
Alexei Svitkine (slow)
2016/07/28 18:37:22
This comment doesn't say much that the call below
gayane -on leave until 09-2017
2016/07/28 21:21:34
Done.
| |
| 799 metrics::DesktopEngagementService::Initialize(); | |
| 800 #endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) | |
| 801 | |
| 793 #if defined(OS_WIN) | 802 #if defined(OS_WIN) |
| 794 chrome_browser::SetupPreReadFieldTrial(); | 803 chrome_browser::SetupPreReadFieldTrial(); |
| 795 #endif // defined(OS_WIN) | 804 #endif // defined(OS_WIN) |
| 796 } | 805 } |
| 797 | 806 |
| 798 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- | 807 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- |
| 799 | 808 |
| 800 void ChromeBrowserMainParts::StartMetricsRecording() { | 809 void ChromeBrowserMainParts::StartMetricsRecording() { |
| 801 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); | 810 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); |
| 802 | 811 |
| (...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2038 chromeos::CrosSettings::Shutdown(); | 2047 chromeos::CrosSettings::Shutdown(); |
| 2039 #endif // defined(OS_CHROMEOS) | 2048 #endif // defined(OS_CHROMEOS) |
| 2040 #endif // defined(OS_ANDROID) | 2049 #endif // defined(OS_ANDROID) |
| 2041 } | 2050 } |
| 2042 | 2051 |
| 2043 // Public members: | 2052 // Public members: |
| 2044 | 2053 |
| 2045 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2054 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2046 chrome_extra_parts_.push_back(parts); | 2055 chrome_extra_parts_.push_back(parts); |
| 2047 } | 2056 } |
| OLD | NEW |