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

Unified Diff: chrome/install_static/install_util.h

Issue 2221833005: Adding support for sampling crashes in Chrome on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scottmg's comments, adding DCHECK Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/install_static/install_util.h
diff --git a/chrome/install_static/install_util.h b/chrome/install_static/install_util.h
index be2a99d4751a49c8509b9b5559afe9b048bcb455..d60f7b732875efcdc9637a43c64ea9de74107a45 100644
--- a/chrome/install_static/install_util.h
+++ b/chrome/install_static/install_util.h
@@ -34,6 +34,7 @@ extern const wchar_t kRegPathClientState[];
extern const wchar_t kRegPathClientStateMedium[];
extern const wchar_t kRegPathChromePolicy[];
extern const wchar_t kRegApField[];
+// Used to retrieve consent for uploading crashes and metrics.
extern const wchar_t kRegValueUsageStats[];
extern const wchar_t kUninstallArgumentsField[];
extern const wchar_t kMetricsReportingEnabled[];
@@ -78,6 +79,14 @@ bool GetCollectStatsConsent();
// Only used by tests.
bool GetCollectStatsConsentForTesting(const std::wstring& exe_path);
+// Returns true if the current executable is currently in the chosen sample that
+// will report stats and crashes.
+bool GetCollectStatsInSample();
+
+// Sets the registry value used for checking if Chrome is in the chosen sample
+// that will report stats and crashes. Returns true if writing was successful.
+bool SetCollectStatsInSample(bool in_sample);
+
// Returns true if if usage stats reporting is controlled by a mandatory
// policy. |metrics_is_enforced_by_policy| will be set to true accordingly.
// TODO(ananta)
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_services_manager_client.cc ('k') | chrome/install_static/install_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698