| 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 //------------------------------------------------------------------------------ | 5 //------------------------------------------------------------------------------ |
| 6 // Description of the life cycle of a instance of MetricsService. | 6 // Description of the life cycle of a instance of MetricsService. |
| 7 // | 7 // |
| 8 // OVERVIEW | 8 // OVERVIEW |
| 9 // | 9 // |
| 10 // A MetricsService instance is typically created at application startup. It is | 10 // A MetricsService instance is typically created at application startup. It is |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 int message_size, | 552 int message_size, |
| 553 bool is_cellular) { | 553 bool is_cellular) { |
| 554 DCHECK(thread_checker_.CalledOnValidThread()); | 554 DCHECK(thread_checker_.CalledOnValidThread()); |
| 555 if (data_use_tracker_) { | 555 if (data_use_tracker_) { |
| 556 data_use_tracker_->UpdateMetricsUsagePrefs(service_name, | 556 data_use_tracker_->UpdateMetricsUsagePrefs(service_name, |
| 557 message_size, | 557 message_size, |
| 558 is_cellular); | 558 is_cellular); |
| 559 } | 559 } |
| 560 } | 560 } |
| 561 | 561 |
| 562 void MetricsService::MergeHistogramDeltas() { | |
| 563 for (MetricsProvider* provider : metrics_providers_) | |
| 564 provider->MergeHistogramDeltas(); | |
| 565 } | |
| 566 | |
| 567 //------------------------------------------------------------------------------ | 562 //------------------------------------------------------------------------------ |
| 568 // private methods | 563 // private methods |
| 569 //------------------------------------------------------------------------------ | 564 //------------------------------------------------------------------------------ |
| 570 | 565 |
| 571 | 566 |
| 572 //------------------------------------------------------------------------------ | 567 //------------------------------------------------------------------------------ |
| 573 // Initialization methods | 568 // Initialization methods |
| 574 | 569 |
| 575 void MetricsService::InitializeMetricsState() { | 570 void MetricsService::InitializeMetricsState() { |
| 576 const int64_t buildtime = MetricsLog::GetBuildTime(); | 571 const int64_t buildtime = MetricsLog::GetBuildTime(); |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 // Redundant setting to assure that we always reset this value at shutdown | 1245 // Redundant setting to assure that we always reset this value at shutdown |
| 1251 // (and that we don't use some alternate path, and not call LogCleanShutdown). | 1246 // (and that we don't use some alternate path, and not call LogCleanShutdown). |
| 1252 clean_shutdown_status_ = CLEANLY_SHUTDOWN; | 1247 clean_shutdown_status_ = CLEANLY_SHUTDOWN; |
| 1253 client_->OnLogCleanShutdown(); | 1248 client_->OnLogCleanShutdown(); |
| 1254 clean_exit_beacon_.WriteBeaconValue(true); | 1249 clean_exit_beacon_.WriteBeaconValue(true); |
| 1255 SetExecutionPhase(ExecutionPhase::SHUTDOWN_COMPLETE, local_state_); | 1250 SetExecutionPhase(ExecutionPhase::SHUTDOWN_COMPLETE, local_state_); |
| 1256 local_state_->SetBoolean(prefs::kStabilitySessionEndCompleted, end_completed); | 1251 local_state_->SetBoolean(prefs::kStabilitySessionEndCompleted, end_completed); |
| 1257 } | 1252 } |
| 1258 | 1253 |
| 1259 } // namespace metrics | 1254 } // namespace metrics |
| OLD | NEW |