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..5dbfcc62f1d7789006bd76219a0dc5e7c10c03da 100644 |
--- a/chrome/browser/component_updater/sw_reporter_installer_win.cc |
+++ b/chrome/browser/component_updater/sw_reporter_installer_win.cc |
@@ -47,6 +47,7 @@ namespace component_updater { |
namespace { |
+using safe_browsing::SwReporterBehaviours; |
using safe_browsing::SwReporterInvocation; |
// These values are used to send UMA information and are replicated in the |
@@ -119,10 +120,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 +217,8 @@ 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; |
+ SwReporterBehaviours supported_behaviours = |
+ SwReporterBehaviours::ALL_DISABLED; |
const base::Value* prompt_value = nullptr; |
if (invocation_params->Get("prompt", &prompt_value)) { |
bool prompt = false; |
@@ -224,13 +226,15 @@ void RunExperimentalSwReporter(const base::FilePath& exe_path, |
ReportExperimentError(SW_REPORTER_EXPERIMENT_ERROR_BAD_PARAMS); |
return; |
} |
- if (prompt) |
- flags |= SwReporterInvocation::FLAG_TRIGGER_PROMPT; |
+ if (prompt) { |
+ supported_behaviours = |
+ supported_behaviours | SwReporterBehaviours::TRIGGER_PROMPT; |
+ } |
} |
auto invocation = SwReporterInvocation::FromCommandLine(command_line); |
invocation.suffix = suffix; |
- invocation.flags = flags; |
+ invocation.supported_behaviours = supported_behaviours; |
invocations.push(invocation); |
} |
@@ -280,10 +284,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 = |
+ SwReporterBehaviours::LOG_TO_RAPPOR | |
+ SwReporterBehaviours::LOG_EXIT_CODE_TO_PREFS | |
+ SwReporterBehaviours::TRIGGER_PROMPT | |
+ SwReporterBehaviours::SEND_REPORTER_LOGS; |
safe_browsing::SwReporterQueue invocations; |
invocations.push(invocation); |