| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 //------------------------------------------------------------------------------ | 5 //------------------------------------------------------------------------------ |
| 6 // Description of the life cycle of a instance of MetricsService. | 6 // Description of the life cycle of a instance of MetricsService. |
| 7 // | 7 // |
| 8 // OVERVIEW | 8 // OVERVIEW |
| 9 // | 9 // |
| 10 // A MetricsService instance is typically created at application startup. It | 10 // A MetricsService instance is typically created at application startup. It |
| (...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1903 plugin_dict->SetInteger(prefs::kStabilityPluginInstances, | 1903 plugin_dict->SetInteger(prefs::kStabilityPluginInstances, |
| 1904 stats.instances); | 1904 stats.instances); |
| 1905 plugins->Append(plugin_dict); | 1905 plugins->Append(plugin_dict); |
| 1906 } | 1906 } |
| 1907 child_process_stats_buffer_.clear(); | 1907 child_process_stats_buffer_.clear(); |
| 1908 } | 1908 } |
| 1909 | 1909 |
| 1910 bool MetricsService::CanLogNotification(NotificationType type, | 1910 bool MetricsService::CanLogNotification(NotificationType type, |
| 1911 const NotificationSource& source, | 1911 const NotificationSource& source, |
| 1912 const NotificationDetails& details) { | 1912 const NotificationDetails& details) { |
| 1913 // We simply don't log anything to UMA if there is a single off the record | 1913 // We simply don't log anything to UMA if there is a single incognito |
| 1914 // session visible. The problem is that we always notify using the orginal | 1914 // session visible. The problem is that we always notify using the orginal |
| 1915 // profile in order to simplify notification processing. | 1915 // profile in order to simplify notification processing. |
| 1916 return !BrowserList::IsOffTheRecordSessionActive(); | 1916 return !BrowserList::IsOffTheRecordSessionActive(); |
| 1917 } | 1917 } |
| 1918 | 1918 |
| 1919 void MetricsService::RecordBooleanPrefValue(const char* path, bool value) { | 1919 void MetricsService::RecordBooleanPrefValue(const char* path, bool value) { |
| 1920 DCHECK(IsSingleThreaded()); | 1920 DCHECK(IsSingleThreaded()); |
| 1921 | 1921 |
| 1922 PrefService* pref = g_browser_process->local_state(); | 1922 PrefService* pref = g_browser_process->local_state(); |
| 1923 DCHECK(pref); | 1923 DCHECK(pref); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1938 thread_id = base::PlatformThread::CurrentId(); | 1938 thread_id = base::PlatformThread::CurrentId(); |
| 1939 return base::PlatformThread::CurrentId() == thread_id; | 1939 return base::PlatformThread::CurrentId() == thread_id; |
| 1940 } | 1940 } |
| 1941 | 1941 |
| 1942 #if defined(OS_CHROMEOS) | 1942 #if defined(OS_CHROMEOS) |
| 1943 void MetricsService::StartExternalMetrics() { | 1943 void MetricsService::StartExternalMetrics() { |
| 1944 external_metrics_ = new chromeos::ExternalMetrics; | 1944 external_metrics_ = new chromeos::ExternalMetrics; |
| 1945 external_metrics_->Start(); | 1945 external_metrics_->Start(); |
| 1946 } | 1946 } |
| 1947 #endif | 1947 #endif |
| OLD | NEW |