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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_match.h

Issue 165163002: Handle Search suggest subtypes for Shortcuts DB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Submit candidate Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 // Removes invalid characters from |text|. Should be called on strings coming 156 // Removes invalid characters from |text|. Should be called on strings coming
157 // from external sources (such as extensions) before assigning to |contents| 157 // from external sources (such as extensions) before assigning to |contents|
158 // or |description|. 158 // or |description|.
159 static base::string16 SanitizeString(const base::string16& text); 159 static base::string16 SanitizeString(const base::string16& text);
160 160
161 // Convenience function to check if |type| is a search (as opposed to a URL or 161 // Convenience function to check if |type| is a search (as opposed to a URL or
162 // an extension). 162 // an extension).
163 static bool IsSearchType(Type type); 163 static bool IsSearchType(Type type);
164 164
165 // Convenience function to check if |type| is a special search suggest type -
166 // like entity, personalized, profile or postfix.
167 static bool IsSpecializedSearchType(Type type);
168
165 // Copies the destination_url with "www." stripped off to 169 // Copies the destination_url with "www." stripped off to
166 // |stripped_destination_url| and also converts https protocol to 170 // |stripped_destination_url| and also converts https protocol to
167 // http. These two conversions are merely to allow comparisons to 171 // http. These two conversions are merely to allow comparisons to
168 // remove likely duplicates; these URLs are not used as actual 172 // remove likely duplicates; these URLs are not used as actual
169 // destination URLs. This method is invoked internally by the 173 // destination URLs. This method is invoked internally by the
170 // AutocompleteResult and does not normally need to be invoked. 174 // AutocompleteResult and does not normally need to be invoked.
171 // If |profile| is not NULL, it is used to get a template URL corresponding 175 // If |profile| is not NULL, it is used to get a template URL corresponding
172 // to this match. The template is used to strip off query args other than 176 // to this match. The template is used to strip off query args other than
173 // the search terms themselves that would otherwise prevent from proper 177 // the search terms themselves that would otherwise prevent from proper
174 // deduping. 178 // deduping.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 const base::string16& text, 358 const base::string16& text,
355 const ACMatchClassifications& classifications) const; 359 const ACMatchClassifications& classifications) const;
356 #endif 360 #endif
357 }; 361 };
358 362
359 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; 363 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification;
360 typedef std::vector<ACMatchClassification> ACMatchClassifications; 364 typedef std::vector<ACMatchClassification> ACMatchClassifications;
361 typedef std::vector<AutocompleteMatch> ACMatches; 365 typedef std::vector<AutocompleteMatch> ACMatches;
362 366
363 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ 367 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_match.cc » ('j') | chrome/browser/autocomplete/shortcuts_backend.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698