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

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

Issue 2892483002: Lose the user gesture expiration check on IdentifyReferrerChainByWebContents (Closed)
Patch Set: address comments from lpz Created 3 years, 7 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 3db1e17a9a58f3121d762dcb7c32cadc60bc2615..54699090a36adf5d484082442db034843555a2d1 100644
--- a/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager.cc
@@ -256,11 +256,8 @@ bool SafeBrowsingNavigationObserverManager::HasUserGesture(
content::WebContents* web_contents) {
if (!web_contents)
return false;
- auto it = user_gesture_map_.find(web_contents);
- if (it != user_gesture_map_.end() &&
- !IsEventExpired(it->second, kUserGestureTTLInSecond)) {
+ if (user_gesture_map_.find(web_contents) != user_gesture_map_.end())
return true;
- }
return false;
}
@@ -439,7 +436,7 @@ void SafeBrowsingNavigationObserverManager::CleanUpNavigationEvents() {
void SafeBrowsingNavigationObserverManager::CleanUpUserGestures() {
for (auto it = user_gesture_map_.begin(); it != user_gesture_map_.end();) {
- if (IsEventExpired(it->second, kUserGestureTTLInSecond))
+ if (IsEventExpired(it->second, kNavigationFootprintTTLInSecond))
it = user_gesture_map_.erase(it);
else
++it;

Powered by Google App Engine
This is Rietveld 408576698