This source file includes following definitions.
- ResolveMetricsReportingEnabled
#include "chrome/browser/ui/options/options_util.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/installer/util/google_update_settings.h"
bool OptionsUtil::ResolveMetricsReportingEnabled(bool enabled) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
GoogleUpdateSettings::SetCollectStatsConsent(enabled);
bool update_pref = GoogleUpdateSettings::GetCollectStatsConsent();
if (enabled != update_pref)
DVLOG(1) << "OptionsUtil: Unable to set crash report status to " << enabled;
enabled = update_pref;
MetricsService* metrics = g_browser_process->metrics_service();
if (metrics) {
if (enabled)
metrics->Start();
else
metrics->Stop();
}
return enabled;
}