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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 int message_size, | 565 int message_size, |
566 bool is_cellular) { | 566 bool is_cellular) { |
567 DCHECK(thread_checker_.CalledOnValidThread()); | 567 DCHECK(thread_checker_.CalledOnValidThread()); |
568 if (data_use_tracker_) { | 568 if (data_use_tracker_) { |
569 data_use_tracker_->UpdateMetricsUsagePrefs(service_name, | 569 data_use_tracker_->UpdateMetricsUsagePrefs(service_name, |
570 message_size, | 570 message_size, |
571 is_cellular); | 571 is_cellular); |
572 } | 572 } |
573 } | 573 } |
574 | 574 |
575 void MetricsService::MergeHistogramDeltas() { | |
576 for (MetricsProvider* provider : metrics_providers_) | |
577 provider->MergeHistogramDeltas(); | |
578 } | |
579 | |
580 //------------------------------------------------------------------------------ | 575 //------------------------------------------------------------------------------ |
581 // private methods | 576 // private methods |
582 //------------------------------------------------------------------------------ | 577 //------------------------------------------------------------------------------ |
583 | 578 |
584 | 579 |
585 //------------------------------------------------------------------------------ | 580 //------------------------------------------------------------------------------ |
586 // Initialization methods | 581 // Initialization methods |
587 | 582 |
588 void MetricsService::InitializeMetricsState() { | 583 void MetricsService::InitializeMetricsState() { |
589 const int64_t buildtime = MetricsLog::GetBuildTime(); | 584 const int64_t buildtime = MetricsLog::GetBuildTime(); |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1267 // Redundant setting to assure that we always reset this value at shutdown | 1262 // Redundant setting to assure that we always reset this value at shutdown |
1268 // (and that we don't use some alternate path, and not call LogCleanShutdown). | 1263 // (and that we don't use some alternate path, and not call LogCleanShutdown). |
1269 clean_shutdown_status_ = CLEANLY_SHUTDOWN; | 1264 clean_shutdown_status_ = CLEANLY_SHUTDOWN; |
1270 client_->OnLogCleanShutdown(); | 1265 client_->OnLogCleanShutdown(); |
1271 clean_exit_beacon_.WriteBeaconValue(true); | 1266 clean_exit_beacon_.WriteBeaconValue(true); |
1272 SetExecutionPhase(MetricsService::SHUTDOWN_COMPLETE, local_state_); | 1267 SetExecutionPhase(MetricsService::SHUTDOWN_COMPLETE, local_state_); |
1273 local_state_->SetBoolean(prefs::kStabilitySessionEndCompleted, end_completed); | 1268 local_state_->SetBoolean(prefs::kStabilitySessionEndCompleted, end_completed); |
1274 } | 1269 } |
1275 | 1270 |
1276 } // namespace metrics | 1271 } // namespace metrics |
OLD | NEW |