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

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

Issue 7031058: Make the app provider match highlighting use the existing ClassifyMatchXXX() machinery, and set t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/extension_app_provider.h
===================================================================
--- chrome/browser/autocomplete/extension_app_provider.h (revision 86341)
+++ chrome/browser/autocomplete/extension_app_provider.h (working copy)
@@ -16,7 +16,6 @@
#define CHROME_BROWSER_AUTOCOMPLETE_EXTENSION_APP_PROVIDER_H_
#pragma once
-#include <string>
#include <utility>
#include <vector>
@@ -34,8 +33,8 @@
ExtensionAppProvider(ACProviderListener* listener, Profile* profile);
// Only used for testing.
- void AddExtensionAppForTesting(const std::string& app_name,
- const std::string url);
+ void AddExtensionAppForTesting(const string16& app_name,
+ const string16& url);
// AutocompleteProvider implementation:
virtual void Start(const AutocompleteInput& input,
@@ -43,7 +42,7 @@
private:
// An ExtensionApp is a pair of Extension Name and the Launch URL.
- typedef std::pair<std::string, std::string> ExtensionApp;
+ typedef std::pair<string16, string16> ExtensionApp;
typedef std::vector<ExtensionApp> ExtensionApps;
virtual ~ExtensionAppProvider();
@@ -54,16 +53,6 @@
// Register for install/uninstall notification so we can update our cache.
void RegisterForNotifications();
- // Highlights a certain part of a match string within a certain match class.
- // |input| is the input we got from the user, |match_class| is the
- // AutoComplete match classification that keeps track of the highlighting
- // values, and |iter| is the location of the user input found within
- // |match_string|.
- void HighlightMatch(const AutocompleteInput& input,
- ACMatchClassifications* match_class,
- std::string::const_iterator iter,
- const std::string& match_string);
-
// Calculate the relevance of the match.
int CalculateRelevance(AutocompleteInput::Type type,
int input_length,

Powered by Google App Engine
This is Rietveld 408576698