Chromium Code Reviews
DescriptionMac: Fix errors in adding the "Paste & Go" menu item.
AutocompleteTextFieldObserver::GetPasteActionStringId() says "Must not
be called unless CanPasteAndGo() returns true." But it doesn't look like
-[AutocompleteTextFieldEditor menuForEvent:] ever actually checked
`CanPasteAndGo()` before adding the menu item.
Currently, if the clipboard is empty (or Chrome failed to access it),
GetPasteActionStringId() will DCHECK when omnibox/clipboard_utils'
GetClipboardText() returns an empty string.
To fix, check CanPasteAndGo() and disable the menu item if it returned
false.
BUG=667512
Committed: https://crrev.com/6da03d5709d85234907de200ad5bda09a7442782
Cr-Commit-Position: refs/heads/master@{#434284}
Patch Set 1 #Patch Set 2 : gmock dance #
Messages
Total messages: 20 (15 generated)
|
||||||||||||||||||||||||||||