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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 #endif // defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) | 416 #endif // defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) |
417 } | 417 } |
418 | 418 |
419 void ChromeMetricsServiceClient::OnInitTaskGotGoogleUpdateData() { | 419 void ChromeMetricsServiceClient::OnInitTaskGotGoogleUpdateData() { |
420 // Start the next part of the init task: fetching performance data. This will | 420 // Start the next part of the init task: fetching performance data. This will |
421 // call into |FinishedReceivingProfilerData()| when the task completes. | 421 // call into |FinishedReceivingProfilerData()| when the task completes. |
422 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( | 422 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( |
423 weak_ptr_factory_.GetWeakPtr()); | 423 weak_ptr_factory_.GetWeakPtr()); |
424 } | 424 } |
425 | 425 |
426 // TODO(vadimt): Consider wrapping params in a struct after the list of params | |
427 // to ReceivedProfilerData settles. crbug/456354. | |
428 void ChromeMetricsServiceClient::ReceivedProfilerData( | 426 void ChromeMetricsServiceClient::ReceivedProfilerData( |
429 const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase, | 427 const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase, |
430 base::ProcessId process_id, | 428 base::ProcessId process_id, |
431 content::ProcessType process_type, | 429 content::ProcessType process_type, |
432 int profiling_phase, | 430 int profiling_phase, |
433 base::TimeDelta phase_start, | 431 base::TimeDelta phase_start, |
434 base::TimeDelta phase_finish, | 432 base::TimeDelta phase_finish, |
435 const metrics::ProfilerEvents& past_events) { | 433 const metrics::ProfilerEvents& past_events) { |
436 profiler_metrics_provider_->RecordProfilerData( | 434 profiler_metrics_provider_->RecordProfilerData( |
437 process_data_phase, process_id, process_type, profiling_phase, | 435 process_data_phase, process_id, process_type, profiling_phase, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 case content::NOTIFICATION_LOAD_START: | 555 case content::NOTIFICATION_LOAD_START: |
558 case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: | 556 case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: |
559 case content::NOTIFICATION_RENDER_WIDGET_HOST_HANG: | 557 case content::NOTIFICATION_RENDER_WIDGET_HOST_HANG: |
560 metrics_service_->OnApplicationNotIdle(); | 558 metrics_service_->OnApplicationNotIdle(); |
561 break; | 559 break; |
562 | 560 |
563 default: | 561 default: |
564 NOTREACHED(); | 562 NOTREACHED(); |
565 } | 563 } |
566 } | 564 } |
OLD | NEW |