Chromium Code Reviews| 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() |