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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/omnibox_watcher.cc

Issue 795343002: Omnibox Watcher: Don't Flag Incidents that are Paste+Enter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: grt's comments Created 6 years 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/incident_reporting/omnibox_watcher.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/omnibox_watcher.cc b/chrome/browser/safe_browsing/incident_reporting/omnibox_watcher.cc
index 4e0a08c04dcf000608d4f0673e7f3880f051f405..1509f35d19aaa94e8f8061f7d94449c45457c1d9 100644
--- a/chrome/browser/safe_browsing/incident_reporting/omnibox_watcher.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/omnibox_watcher.cc
@@ -37,8 +37,8 @@ void OmniboxWatcher::Observe(int type,
// No normal person can type URLs that fast! Navigating to a URL as a
// result of such typing is suspicious.
// TODO(mpearson): Add support for suspicious queries.
- if (!log->is_paste_and_go && log->is_popup_open &&
- (log->text.length() > 200) &&
+ if (!log->is_paste_and_go && !log->last_action_was_paste &&
+ log->is_popup_open && (log->text.length() > 200) &&
(log->elapsed_time_since_user_first_modified_omnibox <
base::TimeDelta::FromSeconds(1)) &&
!AutocompleteMatch::IsSearchType(selected_suggestion.type)) {

Powered by Google App Engine
This is Rietveld 408576698