Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(657)

Side by Side Diff: components/metrics/metrics_service.cc

Issue 1485763002: Merge multiple histogram snapshots into single one for reporting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared-histograms
Patch Set: rebased Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 1100
1101 void MetricsService::RecordCurrentEnvironment(MetricsLog* log) { 1101 void MetricsService::RecordCurrentEnvironment(MetricsLog* log) {
1102 std::vector<variations::ActiveGroupId> synthetic_trials; 1102 std::vector<variations::ActiveGroupId> synthetic_trials;
1103 GetSyntheticFieldTrialsOlderThan(log->creation_time(), &synthetic_trials); 1103 GetSyntheticFieldTrialsOlderThan(log->creation_time(), &synthetic_trials);
1104 log->RecordEnvironment(metrics_providers_.get(), synthetic_trials, 1104 log->RecordEnvironment(metrics_providers_.get(), synthetic_trials,
1105 GetInstallDate(), GetMetricsReportingEnabledDate()); 1105 GetInstallDate(), GetMetricsReportingEnabledDate());
1106 } 1106 }
1107 1107
1108 void MetricsService::RecordCurrentHistograms() { 1108 void MetricsService::RecordCurrentHistograms() {
1109 DCHECK(log_manager_.current_log()); 1109 DCHECK(log_manager_.current_log());
1110 // "true" indicates that StatisticsRecorder should include histograms in
Alexei Svitkine (slow) 2016/02/09 19:46:51 Why is this being removed?
bcwhite 2016/02/11 16:42:39 Done.
1111 // persistent storage.
1112 histogram_snapshot_manager_.PrepareDeltas(
1113 base::StatisticsRecorder::begin(true), base::StatisticsRecorder::end(),
1114 base::Histogram::kNoFlags, base::Histogram::kUmaTargetedHistogramFlag);
1115 } 1110 }
1116 1111
1117 void MetricsService::RecordCurrentStabilityHistograms() { 1112 void MetricsService::RecordCurrentStabilityHistograms() {
1118 DCHECK(log_manager_.current_log()); 1113 DCHECK(log_manager_.current_log());
1119 // "true" indicates that StatisticsRecorder should include histograms in 1114 // "true" indicates that StatisticsRecorder should include histograms in
1120 // persistent storage. 1115 // persistent storage.
1121 histogram_snapshot_manager_.PrepareDeltas( 1116 histogram_snapshot_manager_.PrepareDeltas(
1122 base::StatisticsRecorder::begin(true), base::StatisticsRecorder::end(), 1117 base::StatisticsRecorder::begin(true), base::StatisticsRecorder::end(),
1123 base::Histogram::kNoFlags, base::Histogram::kUmaStabilityHistogramFlag); 1118 base::Histogram::kNoFlags, base::Histogram::kUmaStabilityHistogramFlag);
1124 } 1119 }
(...skipping 27 matching lines...) Expand all
1152 base::Time::Now().ToTimeT()); 1147 base::Time::Now().ToTimeT());
1153 } 1148 }
1154 1149
1155 void MetricsService::SkipAndDiscardUpload() { 1150 void MetricsService::SkipAndDiscardUpload() {
1156 log_manager_.DiscardStagedLog(); 1151 log_manager_.DiscardStagedLog();
1157 scheduler_->UploadCancelled(); 1152 scheduler_->UploadCancelled();
1158 log_upload_in_progress_ = false; 1153 log_upload_in_progress_ = false;
1159 } 1154 }
1160 1155
1161 } // namespace metrics 1156 } // namespace metrics
OLDNEW
« base/metrics/histogram_snapshot_manager.cc ('K') | « components/metrics/metrics_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698