Commit aee07274 authored by jif's avatar jif Committed by Commit bot

Early return the Clipboard Url Provider when the omnibox wasn't focused.

This mirrors what other similar providers do:
https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/autocomplete/zero_suggest_provider.cc&rcl=1428507553&l=98

BUG=None.

Review URL: https://codereview.chromium.org/1072003002

Cr-Commit-Position: refs/heads/master@{#324427}
parent 9dadb84f
...@@ -31,6 +31,8 @@ void ClipboardURLProvider::Start(const AutocompleteInput& input, ...@@ -31,6 +31,8 @@ void ClipboardURLProvider::Start(const AutocompleteInput& input,
bool minimal_changes, bool minimal_changes,
bool called_due_to_focus) { bool called_due_to_focus) {
matches_.clear(); matches_.clear();
if (!called_due_to_focus)
return;
// Attempt to add an AutocompleteMatch only if the user has not entered // Attempt to add an AutocompleteMatch only if the user has not entered
// anything in the omnibox. // anything in the omnibox.
if (input.cursor_position() == base::string16::npos) { if (input.cursor_position() == base::string16::npos) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment