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

Unified Diff: chrome/browser/component_updater/sw_reporter_installer_win.cc

Issue 2347753002: Adds histograms for tracking Software Reporter logs uploads in SRT Fetcher. (Closed)
Patch Set: Define constant 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
« no previous file with comments | « no previous file | chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/sw_reporter_installer_win.cc
diff --git a/chrome/browser/component_updater/sw_reporter_installer_win.cc b/chrome/browser/component_updater/sw_reporter_installer_win.cc
index 6de56e53af146b4477edb70f262c0a68cffc14bc..96d9d25b73e3c015066c55d10d60865e4bdc0c6a 100644
--- a/chrome/browser/component_updater/sw_reporter_installer_win.cc
+++ b/chrome/browser/component_updater/sw_reporter_installer_win.cc
@@ -119,10 +119,10 @@ void ReportExperimentError(SwReporterExperimentError error) {
SW_REPORTER_EXPERIMENT_ERROR_MAX);
}
-// Run the software reporter on the next Chrome startup after it's downloaded.
-// (This is the default |reporter_runner| function passed to the
-// |SwReporterInstallerTraits| constructor in |RegisterSwReporterComponent|
-// below.)
+// Once the Software Reporter is downloaded, schedules it to run sometime after
+// the current browser startup is complete. (This is the default
+// |reporter_runner| function passed to the |SwReporterInstallerTraits|
+// constructor in |RegisterSwReporterComponent| below.)
void RunSwReportersAfterStartup(
const safe_browsing::SwReporterQueue& invocations,
const base::Version& version) {
@@ -216,7 +216,7 @@ void RunExperimentalSwReporter(const base::FilePath& exe_path,
command_line.AppendSwitchASCII("registry-suffix", suffix);
// "prompt" is optional, but if present must be a boolean.
- SwReporterInvocation::Flags flags = 0;
+ SwReporterInvocation::Behaviours supported_behaviours = 0;
const base::Value* prompt_value = nullptr;
if (invocation_params->Get("prompt", &prompt_value)) {
bool prompt = false;
@@ -225,12 +225,12 @@ void RunExperimentalSwReporter(const base::FilePath& exe_path,
return;
}
if (prompt)
- flags |= SwReporterInvocation::FLAG_TRIGGER_PROMPT;
+ supported_behaviours |= SwReporterInvocation::BEHAVIOUR_TRIGGER_PROMPT;
}
auto invocation = SwReporterInvocation::FromCommandLine(command_line);
invocation.suffix = suffix;
- invocation.flags = flags;
+ invocation.supported_behaviours = supported_behaviours;
invocations.push(invocation);
}
@@ -280,10 +280,11 @@ void SwReporterInstallerTraits::ComponentReady(
reporter_runner_);
} else {
auto invocation = SwReporterInvocation::FromFilePath(exe_path);
- invocation.flags = SwReporterInvocation::FLAG_LOG_TO_RAPPOR |
- SwReporterInvocation::FLAG_LOG_EXIT_CODE_TO_PREFS |
- SwReporterInvocation::FLAG_TRIGGER_PROMPT |
- SwReporterInvocation::FLAG_SEND_REPORTER_LOGS;
+ invocation.supported_behaviours =
+ SwReporterInvocation::BEHAVIOUR_LOG_TO_RAPPOR |
+ SwReporterInvocation::BEHAVIOUR_LOG_EXIT_CODE_TO_PREFS |
+ SwReporterInvocation::BEHAVIOUR_TRIGGER_PROMPT |
+ SwReporterInvocation::BEHAVIOUR_ALLOW_SEND_REPORTER_LOGS;
safe_browsing::SwReporterQueue invocations;
invocations.push(invocation);
« no previous file with comments | « no previous file | chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698