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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 #endif // defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) | 423 #endif // defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) |
424 } | 424 } |
425 | 425 |
426 void ChromeMetricsServiceClient::OnInitTaskGotGoogleUpdateData() { | 426 void ChromeMetricsServiceClient::OnInitTaskGotGoogleUpdateData() { |
427 // Start the next part of the init task: fetching performance data. This will | 427 // Start the next part of the init task: fetching performance data. This will |
428 // call into |FinishedReceivingProfilerData()| when the task completes. | 428 // call into |FinishedReceivingProfilerData()| when the task completes. |
429 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( | 429 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( |
430 weak_ptr_factory_.GetWeakPtr()); | 430 weak_ptr_factory_.GetWeakPtr()); |
431 } | 431 } |
432 | 432 |
433 // TODO(vadimt): Consider wrapping params in a struct after the list of params | |
434 // to ReceivedProfilerData settles. crbug/456354. | |
435 void ChromeMetricsServiceClient::ReceivedProfilerData( | 433 void ChromeMetricsServiceClient::ReceivedProfilerData( |
436 const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase, | 434 const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase, |
437 base::ProcessId process_id, | 435 base::ProcessId process_id, |
438 content::ProcessType process_type, | 436 content::ProcessType process_type, |
439 int profiling_phase, | 437 int profiling_phase, |
440 base::TimeDelta phase_start, | 438 base::TimeDelta phase_start, |
441 base::TimeDelta phase_finish, | 439 base::TimeDelta phase_finish, |
442 const metrics::ProfilerEvents& past_events) { | 440 const metrics::ProfilerEvents& past_events) { |
443 profiler_metrics_provider_->RecordProfilerData( | 441 profiler_metrics_provider_->RecordProfilerData( |
444 process_data_phase, process_id, process_type, profiling_phase, | 442 process_data_phase, process_id, process_type, profiling_phase, |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 // Capture the histogram samples. | 614 // Capture the histogram samples. |
617 if (dumps_with_crash != 0) | 615 if (dumps_with_crash != 0) |
618 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); | 616 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); |
619 if (dumps_with_no_crash != 0) | 617 if (dumps_with_no_crash != 0) |
620 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); | 618 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); |
621 int total_dumps = dumps_with_crash + dumps_with_no_crash; | 619 int total_dumps = dumps_with_crash + dumps_with_no_crash; |
622 if (total_dumps != 0) | 620 if (total_dumps != 0) |
623 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); | 621 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); |
624 } | 622 } |
625 #endif // defined(OS_WIN) | 623 #endif // defined(OS_WIN) |
OLD | NEW |