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

Side by Side Diff: chrome/browser/metrics/metrics_reporting_state.h

Issue 506663003: Consolidates accessing and setting the UMA pref to be within metrics code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ 5 #ifndef CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_
6 #define CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ 6 #define CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_
7 7
8 // Tries to set crash stats upload consent to |enabled|. Regardless of success, 8 #include "base/callback.h"
9 // if crash stats uploading is enabled, starts the MetricsService; otherwise 9 #include "components/metrics/metrics_service.h"
10 // stops it. 10
11 // Returns whether crash stats uploading is enabled. 11 // Tries to set crash stats upload consent to |enabled|.
12 // TODO(tfarina): This method is pretty confusing. Clean this up and rename it 12 bool SetGoogleUpdateSettings(bool enabled);
Alexei Svitkine (slow) 2014/08/28 14:46:48 Functions that are only called internally by the .
gayane -on leave until 09-2017 2014/09/03 20:20:08 Done.
13 // to something that makes more sense. 13
14 bool ResolveMetricsReportingEnabled(bool enabled); 14 // Does the necessary changes for MetricsReportingEnabled changes which needs
15 // to be done in the main thread.
16 void SetMetricsReporting(base::Callback<void(bool)> callback_fn,
17 bool enabled, bool success);
18
19 // Calls |SetGoogleUpdateSettings| function in FILE thread with a callback
20 // |SetMetricsReporting| function which does the remaining necessary changes.
21 void InitiateMetricsReportingChange(
22 base::Callback<void(bool)> callback_fn, bool enabled);
15 23
16 #endif // CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ 24 #endif // CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698