Index: chrome/browser/component_updater/sw_reporter_installer_win.h |
diff --git a/chrome/browser/component_updater/sw_reporter_installer_win.h b/chrome/browser/component_updater/sw_reporter_installer_win.h |
index 7427e5a994258c2ae34bdd31839ced2898ceac66..d5be44907f366e191f8a68c91a2233c9bb8f3e51 100644 |
--- a/chrome/browser/component_updater/sw_reporter_installer_win.h |
+++ b/chrome/browser/component_updater/sw_reporter_installer_win.h |
@@ -35,6 +35,14 @@ namespace component_updater { |
class ComponentUpdateService; |
+// These MUST match the values for SwReporterExperimentError in histograms.xml. |
+// Exposed for testing. |
+enum SwReporterExperimentError { |
+ SW_REPORTER_EXPERIMENT_ERROR_BAD_TAG = 0, |
+ SW_REPORTER_EXPERIMENT_ERROR_BAD_PARAMS = 1, |
+ SW_REPORTER_EXPERIMENT_ERROR_MAX, |
+}; |
+ |
// Callback for running the software reporter after it is downloaded. |
using SwReporterRunner = |
base::Callback<void(const safe_browsing::SwReporterInvocation& invocation, |
@@ -42,12 +50,10 @@ using SwReporterRunner = |
class SwReporterInstallerTraits : public ComponentInstallerTraits { |
public: |
- explicit SwReporterInstallerTraits(const SwReporterRunner& reporter_runner); |
+ SwReporterInstallerTraits(const SwReporterRunner& reporter_runner, |
+ bool is_experimental_engine_supported); |
~SwReporterInstallerTraits() override; |
- private: |
- friend class SwReporterInstallerTest; |
- |
// ComponentInstallerTraits implementation. |
bool VerifyInstallation(const base::DictionaryValue& manifest, |
const base::FilePath& dir) const override; |
@@ -64,7 +70,15 @@ class SwReporterInstallerTraits : public ComponentInstallerTraits { |
update_client::InstallerAttributes GetInstallerAttributes() const override; |
std::vector<std::string> GetMimeTypes() const override; |
+ private: |
+ friend class SwReporterInstallerTest; |
+ |
+ // Returns true if the experimental engine is supported and the Feature is |
+ // enabled. |
+ bool IsExperimentalEngineEnabled() const; |
+ |
SwReporterRunner reporter_runner_; |
+ const bool is_experimental_engine_supported_; |
DISALLOW_COPY_AND_ASSIGN(SwReporterInstallerTraits); |
}; |