| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/metrics/chrome_metrics_service_client.h" | 5 #include "chrome/browser/metrics/chrome_metrics_service_client.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 #endif // defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) | 370 #endif // defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) |
| 371 } | 371 } |
| 372 | 372 |
| 373 void ChromeMetricsServiceClient::OnInitTaskGotGoogleUpdateData() { | 373 void ChromeMetricsServiceClient::OnInitTaskGotGoogleUpdateData() { |
| 374 // Start the next part of the init task: fetching performance data. This will | 374 // Start the next part of the init task: fetching performance data. This will |
| 375 // call into |FinishedReceivingProfilerData()| when the task completes. | 375 // call into |FinishedReceivingProfilerData()| when the task completes. |
| 376 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( | 376 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( |
| 377 weak_ptr_factory_.GetWeakPtr()); | 377 weak_ptr_factory_.GetWeakPtr()); |
| 378 } | 378 } |
| 379 | 379 |
| 380 // TODO(vadimt): Consider wrapping params in a struct after the list of params | |
| 381 // to ReceivedProfilerData settles. crbug/456354. | |
| 382 void ChromeMetricsServiceClient::ReceivedProfilerData( | 380 void ChromeMetricsServiceClient::ReceivedProfilerData( |
| 383 const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase, | 381 const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase, |
| 384 base::ProcessId process_id, | 382 base::ProcessId process_id, |
| 385 content::ProcessType process_type, | 383 content::ProcessType process_type, |
| 386 int profiling_phase, | 384 int profiling_phase, |
| 387 const base::TimeDelta& phase_start, | 385 const base::TimeDelta& phase_start, |
| 388 const base::TimeDelta& phase_finish, | 386 const base::TimeDelta& phase_finish, |
| 389 const metrics::ProfilerEvents& past_events) { | 387 const metrics::ProfilerEvents& past_events) { |
| 390 profiler_metrics_provider_->RecordProfilerData( | 388 profiler_metrics_provider_->RecordProfilerData( |
| 391 process_data_phase, process_id, process_type, profiling_phase, | 389 process_data_phase, process_id, process_type, profiling_phase, |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 // Capture the histogram samples. | 560 // Capture the histogram samples. |
| 563 if (dumps_with_crash != 0) | 561 if (dumps_with_crash != 0) |
| 564 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); | 562 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); |
| 565 if (dumps_with_no_crash != 0) | 563 if (dumps_with_no_crash != 0) |
| 566 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); | 564 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); |
| 567 int total_dumps = dumps_with_crash + dumps_with_no_crash; | 565 int total_dumps = dumps_with_crash + dumps_with_no_crash; |
| 568 if (total_dumps != 0) | 566 if (total_dumps != 0) |
| 569 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); | 567 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); |
| 570 } | 568 } |
| 571 #endif // defined(OS_WIN) | 569 #endif // defined(OS_WIN) |
| OLD | NEW |