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

Unified Diff: components/open_from_clipboard/clipboard_url_provider.cc

Issue 1072003002: Early return the Clipboard Url Provider when the omnibox wasn't focused. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/open_from_clipboard/clipboard_url_provider.cc
diff --git a/components/open_from_clipboard/clipboard_url_provider.cc b/components/open_from_clipboard/clipboard_url_provider.cc
index 33fdf38bc81fbcd00c3f119df9c9c4bf0eeb7896..8590784f91048826b9b9efecde74946eeb25f503 100644
--- a/components/open_from_clipboard/clipboard_url_provider.cc
+++ b/components/open_from_clipboard/clipboard_url_provider.cc
@@ -31,6 +31,8 @@ void ClipboardURLProvider::Start(const AutocompleteInput& input,
bool minimal_changes,
bool called_due_to_focus) {
matches_.clear();
+ if (!called_due_to_focus)
+ return;
// Attempt to add an AutocompleteMatch only if the user has not entered
// anything in the omnibox.
if (input.cursor_position() == base::string16::npos) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698