Index: chrome/browser/autocomplete/autocomplete_match.h |
=================================================================== |
--- chrome/browser/autocomplete/autocomplete_match.h (revision 80563) |
+++ chrome/browser/autocomplete/autocomplete_match.h (working copy) |
@@ -9,8 +9,10 @@ |
#include <vector> |
#include <string> |
+#include "base/memory/ref_counted.h" |
#include "content/common/page_transition_types.h" |
#include "googleurl/src/gurl.h" |
+#include "chrome/browser/profiles/profile.h" |
Peter Kasting
2011/04/07 20:19:21
Nit: #includes in alphabetical order
|
class AutocompleteProvider; |
class PageTransition; |
@@ -63,6 +65,24 @@ |
typedef std::vector<ACMatchClassification> ACMatchClassifications; |
+ struct Keyword : public base::RefCounted<Keyword> { |
+ Keyword() |
+ : is_keyword_hint(false), is_keyword_mode(false) { |
+ } |
+ |
+ string16 text; |
+ |
+ const TemplateURL* template_url; |
+ |
+ // True if this match should show a keyword hint. |
+ bool is_keyword_hint; |
+ |
+ // True if the keyword has been accepted or if the default |
+ // is to show keyword mode. |
+ bool is_keyword_mode; |
+ |
Peter Kasting
2011/04/07 20:19:21
Nit: Extra newline
|
+ }; |
+ |
// The type of this match. |
enum Type { |
URL_WHAT_YOU_TYPED = 0, // The input as a URL. |
@@ -123,6 +143,10 @@ |
int style, |
ACMatchClassifications* classifications); |
+ // Copies the destination_url with "www." stripped off to |
+ // destination_url_normalized |
+ void ComputeStrippedDestinationURL(); |
+ |
// The provider of this match, used to remember which provider the user had |
// selected when the input changes. This may be NULL, in which case there is |
// no provider (or memory of the user's selection). |
@@ -155,6 +179,9 @@ |
// It may be empty if there is no possible navigation. |
GURL destination_url; |
+ // The destination URL with "www." stripped off for better dupe finding. |
+ GURL destination_url_normalized; |
Peter Kasting
2011/04/07 20:19:21
Nit: How about |stripped_destination_url| then?
|
+ |
// The main text displayed in the address bar dropdown. |
string16 contents; |
ACMatchClassifications contents_class; |
@@ -179,6 +206,9 @@ |
// keyword was obtained from. |
const TemplateURL* template_url; |
+ // Keyword for this match |
+ scoped_refptr<Keyword> keyword; |
+ |
// True if the user has starred the destination URL. |
bool starred; |