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

Issue 2523053003: Mac: Fix errors in adding the "Paste & Go" menu item. (Closed)

Created:
4 years, 1 month ago by tapted
Modified:
4 years ago
Reviewers:
erikchen
CC:
chromium-reviews, mac-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mac: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -25 lines) Patch
M chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm View 3 chunks +25 lines, -21 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm View 1 4 chunks +8 lines, -4 lines 0 comments Download

Messages

Total messages: 20 (15 generated)
tapted
Hi Erik - please take a look
4 years, 1 month ago (2016-11-23 03:23:22 UTC) #12
erikchen
thanks! lgtm
4 years ago (2016-11-23 18:34:29 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2523053003/20001
4 years ago (2016-11-23 22:37:53 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-11-23 23:49:44 UTC) #18
commit-bot: I haz the power
4 years ago (2016-11-23 23:52:54 UTC) #20
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/6da03d5709d85234907de200ad5bda09a7442782
Cr-Commit-Position: refs/heads/master@{#434284}

Powered by Google App Engine
This is Rietveld 408576698