| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/safe_browsing/chrome_cleaner/srt_field_trial_win.h" | 5 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h" |
| 6 | 6 |
| 7 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "components/variations/variations_associated_data.h" | 10 #include "components/variations/variations_associated_data.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 "https://dl.google.com/dl" | 28 "https://dl.google.com/dl" |
| 29 "/softwareremovaltool/win/chrome_cleanup_tool.exe?chrome-prompt=1"; | 29 "/softwareremovaltool/win/chrome_cleanup_tool.exe?chrome-prompt=1"; |
| 30 const char kCanarySRTDownloadURL[] = | 30 const char kCanarySRTDownloadURL[] = |
| 31 "https://dl.google.com/dl" | 31 "https://dl.google.com/dl" |
| 32 "/softwareremovaltool/win/c/chrome_cleanup_tool.exe?chrome-prompt=1"; | 32 "/softwareremovaltool/win/c/chrome_cleanup_tool.exe?chrome-prompt=1"; |
| 33 | 33 |
| 34 } // namespace | 34 } // namespace |
| 35 | 35 |
| 36 namespace safe_browsing { | 36 namespace safe_browsing { |
| 37 | 37 |
| 38 const base::Feature kInBrowserCleanerUIFeature{ |
| 39 "InBrowserCleanerUI", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 40 |
| 38 bool IsInSRTPromptFieldTrialGroups() { | 41 bool IsInSRTPromptFieldTrialGroups() { |
| 39 return !base::StartsWith(base::FieldTrialList::FindFullName(kSRTPromptTrial), | 42 return !base::StartsWith(base::FieldTrialList::FindFullName(kSRTPromptTrial), |
| 40 kSRTPromptOffGroup, base::CompareCase::SENSITIVE); | 43 kSRTPromptOffGroup, base::CompareCase::SENSITIVE); |
| 41 } | 44 } |
| 42 | 45 |
| 43 bool SRTPromptNeedsElevationIcon() { | 46 bool SRTPromptNeedsElevationIcon() { |
| 44 return !base::StartsWith( | 47 return !base::StartsWith( |
| 45 base::FieldTrialList::FindFullName(kSRTElevationTrial), | 48 base::FieldTrialList::FindFullName(kSRTElevationTrial), |
| 46 kSRTElevationAsNeededGroup, base::CompareCase::SENSITIVE); | 49 kSRTElevationAsNeededGroup, base::CompareCase::SENSITIVE); |
| 47 } | 50 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 64 return variations::GetVariationParamValue(kSRTPromptTrial, | 67 return variations::GetVariationParamValue(kSRTPromptTrial, |
| 65 kSRTPromptSeedParam); | 68 kSRTPromptSeedParam); |
| 66 } | 69 } |
| 67 | 70 |
| 68 void RecordSRTPromptHistogram(SRTPromptHistogramValue value) { | 71 void RecordSRTPromptHistogram(SRTPromptHistogramValue value) { |
| 69 UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.PromptUsage", value, | 72 UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.PromptUsage", value, |
| 70 SRT_PROMPT_MAX); | 73 SRT_PROMPT_MAX); |
| 71 } | 74 } |
| 72 | 75 |
| 73 } // namespace safe_browsing | 76 } // namespace safe_browsing |
| OLD | NEW |