Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 2697323004: Adds UMA metrics for renderer uptime (Closed)
Patch Set: fix Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" 61 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h"
62 #include "chrome/browser/defaults.h" 62 #include "chrome/browser/defaults.h"
63 #include "chrome/browser/first_run/first_run.h" 63 #include "chrome/browser/first_run/first_run.h"
64 #include "chrome/browser/geolocation/chrome_access_token_store.h" 64 #include "chrome/browser/geolocation/chrome_access_token_store.h"
65 #include "chrome/browser/gpu/gpu_profile_cache.h" 65 #include "chrome/browser/gpu/gpu_profile_cache.h"
66 #include "chrome/browser/gpu/three_d_api_observer.h" 66 #include "chrome/browser/gpu/three_d_api_observer.h"
67 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" 67 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
68 #include "chrome/browser/memory/tab_manager.h" 68 #include "chrome/browser/memory/tab_manager.h"
69 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" 69 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
70 #include "chrome/browser/metrics/field_trial_synchronizer.h" 70 #include "chrome/browser/metrics/field_trial_synchronizer.h"
71 #include "chrome/browser/metrics/renderer_uptime_tracker.h"
71 #include "chrome/browser/metrics/thread_watcher.h" 72 #include "chrome/browser/metrics/thread_watcher.h"
72 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" 73 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
73 #include "chrome/browser/net/crl_set_fetcher.h" 74 #include "chrome/browser/net/crl_set_fetcher.h"
74 #include "chrome/browser/performance_monitor/performance_monitor.h" 75 #include "chrome/browser/performance_monitor/performance_monitor.h"
75 #include "chrome/browser/plugins/plugin_prefs.h" 76 #include "chrome/browser/plugins/plugin_prefs.h"
76 #include "chrome/browser/prefs/chrome_command_line_pref_store.h" 77 #include "chrome/browser/prefs/chrome_command_line_pref_store.h"
77 #include "chrome/browser/prefs/chrome_pref_service_factory.h" 78 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
78 #include "chrome/browser/prefs/incognito_mode_prefs.h" 79 #include "chrome/browser/prefs/incognito_mode_prefs.h"
79 #include "chrome/browser/prefs/pref_metrics_service.h" 80 #include "chrome/browser/prefs/pref_metrics_service.h"
80 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 81 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 // Initialize FieldTrialSynchronizer system. This is a singleton and is used 762 // Initialize FieldTrialSynchronizer system. This is a singleton and is used
762 // for posting tasks via base::Bind. Its deleted when it goes out of scope. 763 // for posting tasks via base::Bind. Its deleted when it goes out of scope.
763 // Even though base::Bind does AddRef and Release, the object will not be 764 // Even though base::Bind does AddRef and Release, the object will not be
764 // deleted after the Task is executed. 765 // deleted after the Task is executed.
765 field_trial_synchronizer_ = new FieldTrialSynchronizer(); 766 field_trial_synchronizer_ = new FieldTrialSynchronizer();
766 767
767 #if defined(OS_WIN) || defined(OS_MACOSX) || \ 768 #if defined(OS_WIN) || defined(OS_MACOSX) || \
768 (defined(OS_LINUX) && !defined(OS_CHROMEOS)) 769 (defined(OS_LINUX) && !defined(OS_CHROMEOS))
769 metrics::DesktopSessionDurationTracker::Initialize(); 770 metrics::DesktopSessionDurationTracker::Initialize();
770 #endif 771 #endif
772 metrics::RendererUptimeTracker::Initialize();
771 773
772 #if defined(OS_WIN) 774 #if defined(OS_WIN)
773 // Cleanup the PreRead field trial registry key. 775 // Cleanup the PreRead field trial registry key.
774 // TODO(fdoray): Remove this when M56 hits stable. 776 // TODO(fdoray): Remove this when M56 hits stable.
775 const base::string16 pre_read_field_trial_registry_path = 777 const base::string16 pre_read_field_trial_registry_path =
776 BrowserDistribution::GetDistribution()->GetRegistryPath() + 778 BrowserDistribution::GetDistribution()->GetRegistryPath() +
777 L"\\PreReadFieldTrial"; 779 L"\\PreReadFieldTrial";
778 base::win::RegKey(HKEY_CURRENT_USER, 780 base::win::RegKey(HKEY_CURRENT_USER,
779 pre_read_field_trial_registry_path.c_str(), KEY_SET_VALUE) 781 pre_read_field_trial_registry_path.c_str(), KEY_SET_VALUE)
780 .DeleteKey(L""); 782 .DeleteKey(L"");
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2112 chromeos::CrosSettings::Shutdown(); 2114 chromeos::CrosSettings::Shutdown();
2113 #endif // defined(OS_CHROMEOS) 2115 #endif // defined(OS_CHROMEOS)
2114 #endif // defined(OS_ANDROID) 2116 #endif // defined(OS_ANDROID)
2115 } 2117 }
2116 2118
2117 // Public members: 2119 // Public members:
2118 2120
2119 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2121 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2120 chrome_extra_parts_.push_back(parts); 2122 chrome_extra_parts_.push_back(parts);
2121 } 2123 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698