| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 #if !defined(OS_ANDROID) | 267 #if !defined(OS_ANDROID) |
| 268 #include "chrome/browser/usb/web_usb_detector.h" | 268 #include "chrome/browser/usb/web_usb_detector.h" |
| 269 #endif | 269 #endif |
| 270 | 270 |
| 271 #if defined(MOJO_SHELL_CLIENT) | 271 #if defined(MOJO_SHELL_CLIENT) |
| 272 #include "chrome/browser/lifetime/application_lifetime.h" | 272 #include "chrome/browser/lifetime/application_lifetime.h" |
| 273 #include "content/public/common/mojo_shell_connection.h" | 273 #include "content/public/common/mojo_shell_connection.h" |
| 274 #include "services/shell/runner/common/client_util.h" | 274 #include "services/shell/runner/common/client_util.h" |
| 275 #endif | 275 #endif |
| 276 | 276 |
| 277 #if defined(OS_WIN) || defined(OS_MACOSX) || \ |
| 278 (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 279 #include "chrome/browser/metrics/desktop_engagement/desktop_engagement_service.h
" |
| 280 #endif |
| 281 |
| 277 using content::BrowserThread; | 282 using content::BrowserThread; |
| 278 | 283 |
| 279 namespace { | 284 namespace { |
| 280 | 285 |
| 281 // A provider of Geolocation services to override AccessTokenStore. | 286 // A provider of Geolocation services to override AccessTokenStore. |
| 282 class ChromeGeolocationDelegate : public device::GeolocationDelegate { | 287 class ChromeGeolocationDelegate : public device::GeolocationDelegate { |
| 283 public: | 288 public: |
| 284 ChromeGeolocationDelegate() = default; | 289 ChromeGeolocationDelegate() = default; |
| 285 | 290 |
| 286 scoped_refptr<device::AccessTokenStore> CreateAccessTokenStore() final { | 291 scoped_refptr<device::AccessTokenStore> CreateAccessTokenStore() final { |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 case version_info::Channel::BETA: | 795 case version_info::Channel::BETA: |
| 791 case version_info::Channel::STABLE: | 796 case version_info::Channel::STABLE: |
| 792 // Don't enable instrumentation. | 797 // Don't enable instrumentation. |
| 793 break; | 798 break; |
| 794 } | 799 } |
| 795 | 800 |
| 796 // Register a synthetic field trial for the sampling profiler configuration | 801 // Register a synthetic field trial for the sampling profiler configuration |
| 797 // that was already chosen. | 802 // that was already chosen. |
| 798 sampling_profiler_config_.RegisterSyntheticFieldTrial(); | 803 sampling_profiler_config_.RegisterSyntheticFieldTrial(); |
| 799 | 804 |
| 805 #if defined(OS_WIN) || defined(OS_MACOSX) || \ |
| 806 (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 807 metrics::DesktopEngagementService::Initialize(); |
| 808 #endif |
| 809 |
| 800 #if defined(OS_WIN) | 810 #if defined(OS_WIN) |
| 801 chrome_browser::SetupPreReadFieldTrial(); | 811 chrome_browser::SetupPreReadFieldTrial(); |
| 802 #endif // defined(OS_WIN) | 812 #endif // defined(OS_WIN) |
| 803 } | 813 } |
| 804 | 814 |
| 805 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- | 815 // ChromeBrowserMainParts: |SetupMetricsAndFieldTrials()| related -------------- |
| 806 | 816 |
| 807 void ChromeBrowserMainParts::StartMetricsRecording() { | 817 void ChromeBrowserMainParts::StartMetricsRecording() { |
| 808 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); | 818 TRACE_EVENT0("startup", "ChromeBrowserMainParts::StartMetricsRecording"); |
| 809 | 819 |
| (...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 chromeos::CrosSettings::Shutdown(); | 2068 chromeos::CrosSettings::Shutdown(); |
| 2059 #endif // defined(OS_CHROMEOS) | 2069 #endif // defined(OS_CHROMEOS) |
| 2060 #endif // defined(OS_ANDROID) | 2070 #endif // defined(OS_ANDROID) |
| 2061 } | 2071 } |
| 2062 | 2072 |
| 2063 // Public members: | 2073 // Public members: |
| 2064 | 2074 |
| 2065 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2075 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2066 chrome_extra_parts_.push_back(parts); | 2076 chrome_extra_parts_.push_back(parts); |
| 2067 } | 2077 } |
| OLD | NEW |