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

Unified Diff: chrome/browser/ui/options/options_util.cc

Issue 365253004: Move options_util.* into chrome/browser/metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/options/options_util.cc
diff --git a/chrome/browser/ui/options/options_util.cc b/chrome/browser/ui/options/options_util.cc
deleted file mode 100644
index 41efdc2b96925792e86e6d964bef00872c35f414..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/options/options_util.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/options/options_util.h"
-
-#include "base/threading/thread_restrictions.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/installer/util/google_update_settings.h"
-#include "components/metrics/metrics_service.h"
-
-// static
-bool OptionsUtil::ResolveMetricsReportingEnabled(bool enabled) {
- // GoogleUpdateSettings touches the disk from the UI thread. MetricsService
- // also calls GoogleUpdateSettings below. http://crbug/62626
- 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;
-
- // Only change the pref if GoogleUpdateSettings::GetCollectStatsConsent
- // succeeds.
- enabled = update_pref;
-
- MetricsService* metrics = g_browser_process->metrics_service();
- if (metrics) {
- if (enabled)
- metrics->Start();
- else
- metrics->Stop();
- }
-
- return enabled;
-}

Powered by Google App Engine
This is Rietveld 408576698