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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 1833133002: Disallow paste in readonly omnibox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 533f98421d2e5b5750f68a4c53879768f83f1de0..7d8f51ec1003d392d64ba8823bc93cb4fff82081 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -370,7 +370,9 @@ void OmniboxViewViews::ExecuteCommand(int command_id, int event_flags) {
// These commands do invoke the popup.
case IDS_APP_PASTE:
- OnPaste();
+ if (Textfield::IsCommandIdEnabled(command_id)) {
Peter Kasting 2016/03/25 21:28:37 Use IsCommandIdEnabled() here rather than the Text
+ OnPaste();
+ }
return;
default:
if (Textfield::IsCommandIdEnabled(command_id)) {
« 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