| Index: components/metrics/metrics_service.cc
|
| diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc
|
| index f86f33ab8b511b4d90afd011da3705426cfe4ba4..edfeb9a13e7927237dcc3c8c7affaef509ed0ea7 100644
|
| --- a/components/metrics/metrics_service.cc
|
| +++ b/components/metrics/metrics_service.cc
|
| @@ -353,6 +353,10 @@ int64 MetricsService::GetInstallDate() {
|
| return local_state_->GetInt64(prefs::kInstallDate);
|
| }
|
|
|
| +int64 MetricsService::GetMetricsReportingEnabledDate() {
|
| + return local_state_->GetInt64(prefs::kMetricsReportingEnabledTimestamp);
|
| +}
|
| +
|
| scoped_ptr<const base::FieldTrial::EntropyProvider>
|
| MetricsService::CreateEntropyProvider() {
|
| // TODO(asvitkine): Refactor the code so that MetricsService does not expose
|
| @@ -518,6 +522,10 @@ void MetricsService::ClearSavedStabilityMetrics() {
|
| local_state_->SetBoolean(prefs::kStabilitySessionEndCompleted, true);
|
| }
|
|
|
| +void MetricsService::PushExternalLog(const std::string& log) {
|
| + log_manager_.StoreLog(log, MetricsLog::ONGOING_LOG);
|
| +}
|
| +
|
| //------------------------------------------------------------------------------
|
| // private methods
|
| //------------------------------------------------------------------------------
|
| @@ -1086,7 +1094,7 @@ void MetricsService::RecordCurrentEnvironment(MetricsLog* log) {
|
| std::vector<variations::ActiveGroupId> synthetic_trials;
|
| GetCurrentSyntheticFieldTrials(&synthetic_trials);
|
| log->RecordEnvironment(metrics_providers_.get(), synthetic_trials,
|
| - GetInstallDate());
|
| + GetInstallDate(), GetMetricsReportingEnabledDate());
|
| UMA_HISTOGRAM_COUNTS_100("UMA.SyntheticTrials.Count",
|
| synthetic_trials.size());
|
| }
|
|
|