| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 // finished, it will call OnMemoryDetailCollectionDone. That will in turn | 735 // finished, it will call OnMemoryDetailCollectionDone. That will in turn |
| 736 // call HistogramSynchronization to collect histograms from all renderers and | 736 // call HistogramSynchronization to collect histograms from all renderers and |
| 737 // then call OnHistogramSynchronizationDone to continue processing. | 737 // then call OnHistogramSynchronizationDone to continue processing. |
| 738 DCHECK(!waiting_for_collect_final_metrics_step_); | 738 DCHECK(!waiting_for_collect_final_metrics_step_); |
| 739 waiting_for_collect_final_metrics_step_ = true; | 739 waiting_for_collect_final_metrics_step_ = true; |
| 740 | 740 |
| 741 base::Closure callback = | 741 base::Closure callback = |
| 742 base::Bind(&ChromeMetricsServiceClient::OnMemoryDetailCollectionDone, | 742 base::Bind(&ChromeMetricsServiceClient::OnMemoryDetailCollectionDone, |
| 743 weak_ptr_factory_.GetWeakPtr()); | 743 weak_ptr_factory_.GetWeakPtr()); |
| 744 | 744 |
| 745 scoped_refptr<MetricsMemoryDetails> details( | 745 scoped_refptr<MetricsMemoryDetails> details(new MetricsMemoryDetails( |
| 746 new MetricsMemoryDetails(callback, &memory_growth_tracker_)); | 746 callback, &memory_growth_tracker_, &peak_memory_usage_tracker_)); |
| 747 details->StartFetch(); | 747 details->StartFetch(); |
| 748 } | 748 } |
| 749 | 749 |
| 750 void ChromeMetricsServiceClient::MergeHistogramDeltas() { | 750 void ChromeMetricsServiceClient::MergeHistogramDeltas() { |
| 751 DCHECK(GetMetricsService()); | 751 DCHECK(GetMetricsService()); |
| 752 GetMetricsService()->MergeHistogramDeltas(); | 752 GetMetricsService()->MergeHistogramDeltas(); |
| 753 } | 753 } |
| 754 | 754 |
| 755 void ChromeMetricsServiceClient::OnMemoryDetailCollectionDone() { | 755 void ChromeMetricsServiceClient::OnMemoryDetailCollectionDone() { |
| 756 DCHECK(thread_checker_.CalledOnValidThread()); | 756 DCHECK(thread_checker_.CalledOnValidThread()); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 } | 884 } |
| 885 } | 885 } |
| 886 | 886 |
| 887 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { | 887 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { |
| 888 metrics_service_->OnApplicationNotIdle(); | 888 metrics_service_->OnApplicationNotIdle(); |
| 889 } | 889 } |
| 890 | 890 |
| 891 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() { | 891 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() { |
| 892 return metrics::IsCellularLogicEnabled(); | 892 return metrics::IsCellularLogicEnabled(); |
| 893 } | 893 } |
| OLD | NEW |