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

Unified Diff: chrome/browser/safe_browsing/srt_fetcher_win.h

Issue 2347753002: Adds histograms for tracking Software Reporter logs uploads in SRT Fetcher. (Closed)
Patch Set: Registry error histogram and more comments 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/safe_browsing/srt_fetcher_win.h
diff --git a/chrome/browser/safe_browsing/srt_fetcher_win.h b/chrome/browser/safe_browsing/srt_fetcher_win.h
index 1ff81f3980caa5bfd82bef1258a706b170a81b07..6444733c433c54f89d9e541dbc77fd2ef54a4925 100644
--- a/chrome/browser/safe_browsing/srt_fetcher_win.h
+++ b/chrome/browser/safe_browsing/srt_fetcher_win.h
@@ -59,17 +59,21 @@ struct SwReporterInvocation {
// ending in |suffix|. For the canonical version, |suffix| will be empty.
std::string suffix;
- // Flags to control optional behaviours. By default all are enabled;
- // experimental versions of the reporter will turn off the behaviours that
- // are not yet supported.
- using Flags = uint32_t;
- enum : Flags {
- FLAG_LOG_TO_RAPPOR = 0x1,
- FLAG_LOG_EXIT_CODE_TO_PREFS = 0x2,
- FLAG_TRIGGER_PROMPT = 0x4,
- FLAG_SEND_REPORTER_LOGS = 0x8,
+ // Flags to control behaviours the Software Reporter should support by
+ // default. These flags are set in the Reporter installer, and experimental
+ // versions of the reporter will turn on the behaviours that are not yet
+ // supported.
+ using Behaviours = uint32_t;
+ enum : Behaviours {
+ BEHAVIOUR_LOG_TO_RAPPOR = 0x1,
+ BEHAVIOUR_LOG_EXIT_CODE_TO_PREFS = 0x2,
+ BEHAVIOUR_TRIGGER_PROMPT = 0x4,
+ BEHAVIOUR_ALLOW_SEND_REPORTER_LOGS = 0x8,
};
- Flags flags = 0;
+ Behaviours supported_behaviours = 0;
+
+ // Whether logs upload was enabled in this invocation.
+ bool logs_upload_enabled = false;
SwReporterInvocation();
@@ -78,6 +82,8 @@ struct SwReporterInvocation {
const base::CommandLine& command_line);
bool operator==(const SwReporterInvocation& other) const;
+
+ bool BehaviourIsSupported(Behaviours intended_behaviour) const;
};
using SwReporterQueue = std::queue<SwReporterInvocation>;

Powered by Google App Engine
This is Rietveld 408576698