| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" | 5 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 326 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 327 const base::FilePath exe_path(install_dir.Append(kSwReporterExeName)); | 327 const base::FilePath exe_path(install_dir.Append(kSwReporterExeName)); |
| 328 if (IsExperimentalEngineEnabled()) { | 328 if (IsExperimentalEngineEnabled()) { |
| 329 RunExperimentalSwReporter(exe_path, version, std::move(manifest), | 329 RunExperimentalSwReporter(exe_path, version, std::move(manifest), |
| 330 reporter_runner_); | 330 reporter_runner_); |
| 331 } else { | 331 } else { |
| 332 base::CommandLine command_line(exe_path); | 332 base::CommandLine command_line(exe_path); |
| 333 command_line.AppendSwitchASCII(kSessionIdSwitch, GenerateSessionId()); | 333 command_line.AppendSwitchASCII(kSessionIdSwitch, GenerateSessionId()); |
| 334 auto invocation = SwReporterInvocation::FromCommandLine(command_line); | 334 auto invocation = SwReporterInvocation::FromCommandLine(command_line); |
| 335 invocation.supported_behaviours = | 335 invocation.supported_behaviours = |
| 336 SwReporterInvocation::BEHAVIOUR_LOG_TO_RAPPOR | | |
| 337 SwReporterInvocation::BEHAVIOUR_LOG_EXIT_CODE_TO_PREFS | | 336 SwReporterInvocation::BEHAVIOUR_LOG_EXIT_CODE_TO_PREFS | |
| 338 SwReporterInvocation::BEHAVIOUR_TRIGGER_PROMPT | | 337 SwReporterInvocation::BEHAVIOUR_TRIGGER_PROMPT | |
| 339 SwReporterInvocation::BEHAVIOUR_ALLOW_SEND_REPORTER_LOGS; | 338 SwReporterInvocation::BEHAVIOUR_ALLOW_SEND_REPORTER_LOGS; |
| 340 | 339 |
| 341 safe_browsing::SwReporterQueue invocations; | 340 safe_browsing::SwReporterQueue invocations; |
| 342 invocations.push(invocation); | 341 invocations.push(invocation); |
| 343 reporter_runner_.Run(invocations, version); | 342 reporter_runner_.Run(invocations, version); |
| 344 } | 343 } |
| 345 } | 344 } |
| 346 | 345 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 } | 495 } |
| 497 | 496 |
| 498 void RegisterProfilePrefsForSwReporter( | 497 void RegisterProfilePrefsForSwReporter( |
| 499 user_prefs::PrefRegistrySyncable* registry) { | 498 user_prefs::PrefRegistrySyncable* registry) { |
| 500 registry->RegisterStringPref(prefs::kSwReporterPromptVersion, ""); | 499 registry->RegisterStringPref(prefs::kSwReporterPromptVersion, ""); |
| 501 | 500 |
| 502 registry->RegisterStringPref(prefs::kSwReporterPromptSeed, ""); | 501 registry->RegisterStringPref(prefs::kSwReporterPromptSeed, ""); |
| 503 } | 502 } |
| 504 | 503 |
| 505 } // namespace component_updater | 504 } // namespace component_updater |
| OLD | NEW |