Index: chrome/browser/safe_browsing/srt_global_error_win.cc |
diff --git a/chrome/browser/safe_browsing/srt_global_error_win.cc b/chrome/browser/safe_browsing/srt_global_error_win.cc |
index 28cd7ddd13ab5f30853a0b5a79673e7ba7f77c7f..316508202df05972932b334a3a84204d8ed589ec 100644 |
--- a/chrome/browser/safe_browsing/srt_global_error_win.cc |
+++ b/chrome/browser/safe_browsing/srt_global_error_win.cc |
@@ -29,6 +29,7 @@ |
#include "chrome/grit/chromium_strings.h" |
#include "chrome/grit/generated_resources.h" |
#include "chrome/installer/util/install_util.h" |
+#include "components/chrome_cleaner/public/constants/constants.h" |
#include "components/component_updater/pref_names.h" |
#include "components/prefs/pref_service.h" |
#include "components/version_info/version_info.h" |
@@ -52,14 +53,8 @@ const char kSRTDownloadURL[] = |
// downloaded. |
const base::FilePath::CharType kExecutableExtension[] = L"exe"; |
-// Switches to add to the command line when executing the SRT. |
-const char kChromePromptSwitch[] = "chrome-prompt"; |
-const char kChromeExePathSwitch[] = "chrome-exe-path"; |
-const char kChromeSystemInstallSwitch[] = "chrome-system-install"; |
-const char kUmaUserSwitch[] = "uma-user"; |
- |
-// Values to be passed to the kChromePromptSwitch of the Chrome Cleanup Tool to |
-// indicate how the user interacted with the accept button. |
+// Values to be passed to the chrome_cleaner::kChromePromptSwitch of the Chrome |
+// Cleanup Tool to indicate how the user interacted with the accept button. |
Joe Mason
2017/04/13 17:54:01
Does it make sense to put these in public/constant
ftirelo
2017/04/18 15:26:49
Done.
|
enum class ChromePromptValue { |
// The user accepted the prompt when the prompt was first shown. |
kPrompted = 3, |
@@ -83,26 +78,29 @@ void MaybeExecuteSRTFromBlockingPool( |
if (base::ReplaceFile(downloaded_path, executable_path, nullptr)) { |
base::CommandLine srt_command_line(executable_path); |
srt_command_line.AppendSwitchASCII( |
- kChromePromptSwitch, |
+ chrome_cleaner::kChromePromptSwitch, |
base::IntToString(static_cast<int>(prompt_value))); |
- srt_command_line.AppendSwitchASCII(kChromeVersionSwitch, |
+ srt_command_line.AppendSwitchASCII(chrome_cleaner::kChromeVersionSwitch, |
version_info::GetVersionNumber()); |
- srt_command_line.AppendSwitchASCII(kChromeChannelSwitch, |
+ srt_command_line.AppendSwitchASCII(chrome_cleaner::kChromeChannelSwitch, |
base::IntToString(ChannelAsInt())); |
base::FilePath chrome_exe_path; |
PathService::Get(base::FILE_EXE, &chrome_exe_path); |
- srt_command_line.AppendSwitchPath(kChromeExePathSwitch, chrome_exe_path); |
+ srt_command_line.AppendSwitchPath(chrome_cleaner::kChromeExePathSwitch, |
+ chrome_exe_path); |
if (!InstallUtil::IsPerUserInstall()) |
- srt_command_line.AppendSwitch(kChromeSystemInstallSwitch); |
+ srt_command_line.AppendSwitch( |
+ chrome_cleaner::kChromeSystemInstallSwitch); |
if (metrics_enabled) { |
- srt_command_line.AppendSwitch(kUmaUserSwitch); |
- srt_command_line.AppendSwitch(kEnableCrashReporting); |
+ srt_command_line.AppendSwitch(chrome_cleaner::kUmaUserSwitch); |
+ srt_command_line.AppendSwitch(chrome_cleaner::kEnableCrashReporting); |
} |
if (sber_enabled) |
- srt_command_line.AppendSwitch(kExtendedSafeBrowsingEnabledSwitch); |
+ srt_command_line.AppendSwitch( |
+ chrome_cleaner::kExtendedSafeBrowsingEnabledSwitch); |
base::Process srt_process( |
base::LaunchProcess(srt_command_line, base::LaunchOptions())); |