| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 // then call OnHistogramSynchronizationDone to continue processing. | 552 // then call OnHistogramSynchronizationDone to continue processing. |
| 553 DCHECK(!waiting_for_collect_final_metrics_step_); | 553 DCHECK(!waiting_for_collect_final_metrics_step_); |
| 554 waiting_for_collect_final_metrics_step_ = true; | 554 waiting_for_collect_final_metrics_step_ = true; |
| 555 | 555 |
| 556 base::Closure callback = | 556 base::Closure callback = |
| 557 base::Bind(&ChromeMetricsServiceClient::OnMemoryDetailCollectionDone, | 557 base::Bind(&ChromeMetricsServiceClient::OnMemoryDetailCollectionDone, |
| 558 weak_ptr_factory_.GetWeakPtr()); | 558 weak_ptr_factory_.GetWeakPtr()); |
| 559 | 559 |
| 560 scoped_refptr<MetricsMemoryDetails> details( | 560 scoped_refptr<MetricsMemoryDetails> details( |
| 561 new MetricsMemoryDetails(callback, &memory_growth_tracker_)); | 561 new MetricsMemoryDetails(callback, &memory_growth_tracker_)); |
| 562 details->StartFetch(MemoryDetails::FROM_CHROME_ONLY); | 562 details->StartFetch(); |
| 563 } | 563 } |
| 564 | 564 |
| 565 void ChromeMetricsServiceClient::OnMemoryDetailCollectionDone() { | 565 void ChromeMetricsServiceClient::OnMemoryDetailCollectionDone() { |
| 566 DCHECK(thread_checker_.CalledOnValidThread()); | 566 DCHECK(thread_checker_.CalledOnValidThread()); |
| 567 | 567 |
| 568 // This function should only be called as the callback from an ansynchronous | 568 // This function should only be called as the callback from an ansynchronous |
| 569 // step. | 569 // step. |
| 570 DCHECK(waiting_for_collect_final_metrics_step_); | 570 DCHECK(waiting_for_collect_final_metrics_step_); |
| 571 | 571 |
| 572 // Create a callback_task for OnHistogramSynchronizationDone. | 572 // Create a callback_task for OnHistogramSynchronizationDone. |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 } | 686 } |
| 687 } | 687 } |
| 688 | 688 |
| 689 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { | 689 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { |
| 690 metrics_service_->OnApplicationNotIdle(); | 690 metrics_service_->OnApplicationNotIdle(); |
| 691 } | 691 } |
| 692 | 692 |
| 693 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() { | 693 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() { |
| 694 return IsCellularLogicEnabled(); | 694 return IsCellularLogicEnabled(); |
| 695 } | 695 } |
| OLD | NEW |