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

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

Issue 8364001: Strip special characters in extension omnibox suggestions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
Index: chrome/browser/autocomplete/keyword_provider.h
===================================================================
--- chrome/browser/autocomplete/keyword_provider.h (revision 107110)
+++ chrome/browser/autocomplete/keyword_provider.h (working copy)
@@ -17,11 +17,14 @@
#pragma once
#include <string>
+#include <vector>
+#include "base/gtest_prod_util.h"
#include "chrome/browser/autocomplete/autocomplete.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+struct ExtensionOmniboxSuggestion;
class Profile;
class TemplateURL;
class TemplateURLService;
@@ -130,6 +133,14 @@
const string16& remaining_input,
int relevance);
+ // Creates an AutocompleteMatch from an extension omnibox suggestion.
+ AutocompleteMatch CreateAutocompleteMatchFromSuggestion(
+ TemplateURLService* model,
+ const string16& keyword,
+ const AutocompleteInput& input,
+ const ExtensionOmniboxSuggestion& suggestion,
+ int relevance);
+
void EnterExtensionKeywordMode(const std::string& extension_id);
void MaybeEndExtensionKeywordMode();
@@ -161,6 +172,8 @@
content::NotificationRegistrar registrar_;
+ FRIEND_TEST_ALL_PREFIXES(KeywordProviderTest, SuggestionMatchSanitize);
+
DISALLOW_COPY_AND_ASSIGN(KeywordProvider);
};

Powered by Google App Engine
This is Rietveld 408576698