Chromium Code Reviews| Index: chrome/browser/extensions/api/feedback_private/feedback_private_api.cc |
| diff --git a/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc b/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc |
| index 6e570edb81d076bbc183e29356e4369d0cca2a41..0180a28efb2f7d636153de8c5299d6c87bd80e81 100644 |
| --- a/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc |
| +++ b/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc |
| @@ -32,7 +32,9 @@ |
| #include "url/url_util.h" |
| #if defined(OS_WIN) |
| +#include "base/feature_list.h" |
| #include "chrome/browser/safe_browsing/srt_fetcher_win.h" |
| +#include "chrome/common/extensions/api/feedback_private.h" |
|
afakhry
2016/06/27 19:59:53
Nit: Please remove this include. This file is alre
|
| #endif |
| using extensions::api::feedback_private::SystemInformation; |
| @@ -50,6 +52,13 @@ std::string StripFakepath(const std::string& path) { |
| return path; |
| } |
| +#if defined(OS_WIN) |
| +// Allows enabling/disabling SRT Prompt as a Variations feature. |
| +constexpr base::Feature kSrtPromptOnFeedbackForm { |
| + "SrtPromptOnFeedbackForm", base::FEATURE_DISABLED_BY_DEFAULT |
| +}; |
| +#endif |
| + |
| } // namespace |
| namespace extensions { |
| @@ -86,17 +95,18 @@ void FeedbackPrivateAPI::RequestFeedback( |
| const std::string& description_template, |
| const std::string& category_tag, |
| const GURL& page_url) { |
| + |
|
afakhry
2016/06/27 19:59:53
Nit: Remove this line.
|
| #if defined(OS_WIN) |
| // Show prompt for Software Removal Tool if the Reporter component has found |
| // unwanted software, and the user has never run the cleaner before. |
| - if (safe_browsing::ReporterFoundUws() && |
| + if (base::FeatureList::IsEnabled(kSrtPromptOnFeedbackForm) && |
| + safe_browsing::ReporterFoundUws() && |
| !safe_browsing::UserHasRunCleaner()) { |
| RequestFeedbackForFlow(description_template, category_tag, page_url, |
| FeedbackFlow::FEEDBACK_FLOW_SHOWSRTPROMPT); |
| return; |
| } |
| #endif |
| - |
| RequestFeedbackForFlow(description_template, category_tag, page_url, |
| FeedbackFlow::FEEDBACK_FLOW_REGULAR); |
| } |