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

Unified Diff: chrome/renderer/searchbox/searchbox_extension.cc

Issue 12319108: Prevent querying of restricted query values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « chrome/renderer/searchbox/searchbox.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox/searchbox_extension.cc
diff --git a/chrome/renderer/searchbox/searchbox_extension.cc b/chrome/renderer/searchbox/searchbox_extension.cc
index 25c4e09c1cb55eb41e68681d7746a3f9d8f34710..b0bbe4473b29dfb3d3535b13a86a6f5f62139551 100644
--- a/chrome/renderer/searchbox/searchbox_extension.cc
+++ b/chrome/renderer/searchbox/searchbox_extension.cc
@@ -873,6 +873,9 @@ v8::Handle<v8::Value>
std::vector<InstantSuggestion> suggestions;
suggestions.push_back(InstantSuggestion(text, behavior, type));
SearchBox::Get(render_view)->SetSuggestions(suggestions);
+ // Clear the SearchBox's query text explicitly since this is a restricted
+ // value.
+ SearchBox::Get(render_view)->ClearQuery();
return v8::Undefined();
}
@@ -919,6 +922,9 @@ v8::Handle<v8::Value>
std::vector<InstantSuggestion> suggestions;
suggestions.push_back(InstantSuggestion(text, behavior, type));
SearchBox::Get(render_view)->SetSuggestions(suggestions);
+ // Clear the SearchBox's query text explicitly since this is a restricted
+ // value.
+ SearchBox::Get(render_view)->ClearQuery();
return v8::Undefined();
}
« no previous file with comments | « chrome/renderer/searchbox/searchbox.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698