Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3525)

Unified Diff: chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc

Issue 2821163002: Clean up DownloadAttribution Finch experiments (Closed)
Patch Set: nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc b/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
index 64de674f4852c040669ba708c99862e5fc31f544..880063d948e806dd21535abab1b5e494066be4b1 100644
--- a/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
@@ -195,9 +195,6 @@ std::size_t NavigationEventList::CleanUpNavigationEvents() {
// -----------------SafeBrowsingNavigationObserverManager-----------
// static
-const base::Feature SafeBrowsingNavigationObserverManager::kDownloadAttribution{
- "DownloadAttribution", base::FEATURE_ENABLED_BY_DEFAULT};
-// static
bool SafeBrowsingNavigationObserverManager::IsUserGestureExpired(
const base::Time& timestamp) {
return IsEventExpired(timestamp, kUserGestureTTLInSecond);
@@ -215,12 +212,14 @@ GURL SafeBrowsingNavigationObserverManager::ClearEmptyRef(const GURL& url) {
// static
bool SafeBrowsingNavigationObserverManager::IsEnabledAndReady(
- Profile* profile) {
- return base::FeatureList::IsEnabled(
- SafeBrowsingNavigationObserverManager::kDownloadAttribution) &&
- profile->GetPrefs()->GetBoolean(prefs::kSafeBrowsingEnabled) &&
- g_browser_process->safe_browsing_service() &&
- g_browser_process->safe_browsing_service()->navigation_observer_manager();
+ content::WebContents* web_contents) {
lpz 2017/04/20 14:37:02 Feels like it might be better to keep passing Prof
Jialiu Lin 2017/04/20 18:02:56 Acknowledged. IsEnabledAndReady is only called ins
+ Profile* profile =
+ Profile::FromBrowserContext(web_contents->GetBrowserContext());
+ return profile &&
+ profile->GetPrefs()->GetBoolean(prefs::kSafeBrowsingEnabled) &&
+ g_browser_process->safe_browsing_service() &&
+ g_browser_process->safe_browsing_service()
+ ->navigation_observer_manager();
}
SafeBrowsingNavigationObserverManager::SafeBrowsingNavigationObserverManager()

Powered by Google App Engine
This is Rietveld 408576698