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

Unified Diff: chrome/browser/metrics/chrome_metrics_service_accessor.h

Issue 2302823003: Only report PasswordState in Sync for UMA+non-custom passphrase users. (Closed)
Patch Set: Created 4 years, 3 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/metrics/chrome_metrics_service_accessor.h
diff --git a/chrome/browser/metrics/chrome_metrics_service_accessor.h b/chrome/browser/metrics/chrome_metrics_service_accessor.h
index 333cd127c8693b4ed9870d43fd9aeceb073243fa..0295fbcc6065b319b63cd8316f8be55cbff53b1d 100644
--- a/chrome/browser/metrics/chrome_metrics_service_accessor.h
+++ b/chrome/browser/metrics/chrome_metrics_service_accessor.h
@@ -17,6 +17,7 @@
class BrowserProcessImpl;
class Profile;
class ChromeMetricsServiceClient;
+class ChromePasswordManagerClient;
namespace {
class CrashesDOMHandler;
@@ -114,15 +115,25 @@ class ChromeMetricsServiceAccessor : public metrics::MetricsServiceAccessor {
friend class safe_browsing::SafeBrowsingUIManager;
friend void SyzyASANRegisterExperiment(const char*, const char*);
friend class ChromeMetricsServiceClient;
+ friend class ChromePasswordManagerClient;
FRIEND_TEST_ALL_PREFIXES(ChromeMetricsServiceAccessorTest,
MetricsReportingEnabled);
+ FRIEND_TEST_ALL_PREFIXES(ChromePasswordManagerClientTest,
+ ShouldAnnotateNavigationEntry);
+
// Returns true if metrics reporting is enabled.
// TODO(gayane): Consolidate metric prefs on all platforms.
// http://crbug.com/362192, http://crbug.com/532084
static bool IsMetricsAndCrashReportingEnabled();
+
+ // If poiner is non-null, the value will be returned from
+ // IsMetricsAndCrashReportingEnabled(). Pointer must be valid until
+ // it is reset to null.
+ static void SetMetricsAndCrashReportingForTesting(const bool* value);
Alexei Svitkine (slow) 2016/09/02 18:05:45 I'm OK with this being public so that further test
Nathan Parker 2016/09/02 22:42:36 Done.
+
// Calls metrics::MetricsServiceAccessor::RegisterSyntheticFieldTrial() with
// g_browser_process->metrics_service(). See that function's declaration for
// details.

Powered by Google App Engine
This is Rietveld 408576698