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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 explicit ChildProcessStats(ChildProcessInfo::ProcessType type) | 275 explicit ChildProcessStats(ChildProcessInfo::ProcessType type) |
276 : process_launches(0), | 276 : process_launches(0), |
277 process_crashes(0), | 277 process_crashes(0), |
278 instances(0), | 278 instances(0), |
279 process_type(type) {} | 279 process_type(type) {} |
280 | 280 |
281 // This constructor is only used by the map to return some default value for | 281 // This constructor is only used by the map to return some default value for |
282 // an index for which no value has been assigned. | 282 // an index for which no value has been assigned. |
283 ChildProcessStats() | 283 ChildProcessStats() |
284 : process_launches(0), | 284 : process_launches(0), |
285 process_crashes(0), | 285 process_crashes(0), |
286 instances(0), | 286 instances(0), |
287 process_type(ChildProcessInfo::UNKNOWN_PROCESS) {} | 287 process_type(ChildProcessInfo::UNKNOWN_PROCESS) {} |
288 | 288 |
289 // The number of times that the given child process has been launched | 289 // The number of times that the given child process has been launched |
290 int process_launches; | 290 int process_launches; |
291 | 291 |
292 // The number of times that the given child process has crashed | 292 // The number of times that the given child process has crashed |
293 int process_crashes; | 293 int process_crashes; |
294 | 294 |
295 // The number of instances of this child process that have been created. | 295 // The number of instances of this child process that have been created. |
296 // An instance is a DOM object rendered by this child process during a page | 296 // An instance is a DOM object rendered by this child process during a page |
297 // load. | 297 // load. |
(...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1693 thread_id = base::PlatformThread::CurrentId(); | 1693 thread_id = base::PlatformThread::CurrentId(); |
1694 return base::PlatformThread::CurrentId() == thread_id; | 1694 return base::PlatformThread::CurrentId() == thread_id; |
1695 } | 1695 } |
1696 | 1696 |
1697 #if defined(OS_CHROMEOS) | 1697 #if defined(OS_CHROMEOS) |
1698 void MetricsService::StartExternalMetrics() { | 1698 void MetricsService::StartExternalMetrics() { |
1699 external_metrics_ = new chromeos::ExternalMetrics; | 1699 external_metrics_ = new chromeos::ExternalMetrics; |
1700 external_metrics_->Start(); | 1700 external_metrics_->Start(); |
1701 } | 1701 } |
1702 #endif | 1702 #endif |
OLD | NEW |