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

Unified Diff: chrome/browser/autocomplete/keyword_provider.cc

Issue 3259010: Don't treat input with a scheme that's not "http" or "https" as a potential k... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | chrome/browser/autocomplete/keyword_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/keyword_provider.cc
===================================================================
--- chrome/browser/autocomplete/keyword_provider.cc (revision 58197)
+++ chrome/browser/autocomplete/keyword_provider.cc (working copy)
@@ -24,7 +24,7 @@
// otherwise.
class KeywordProvider::ScopedEndExtensionKeywordMode {
public:
- ScopedEndExtensionKeywordMode(KeywordProvider* provider)
+ explicit ScopedEndExtensionKeywordMode(KeywordProvider* provider)
: provider_(provider) { }
~ScopedEndExtensionKeywordMode() {
if (provider_)
@@ -177,6 +177,9 @@
// front of our vector.
if (keyword_matches.front() == keyword) {
const TemplateURL* template_url(model->GetTemplateURLForKeyword(keyword));
+ // TODO(pkasting): We should probably check that if the user explicitly
+ // typed a scheme, that scheme matches the one in |template_url|.
+
if (profile_ &&
!input.synchronous_only() && template_url->IsExtensionKeyword()) {
// If this extension keyword is disabled, make sure we don't add any
« no previous file with comments | « no previous file | chrome/browser/autocomplete/keyword_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698