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

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

Issue 9689085: Clean up ShortcutsProvider and related classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/autocomplete_match.h
===================================================================
--- chrome/browser/autocomplete/autocomplete_match.h (revision 126477)
+++ chrome/browser/autocomplete/autocomplete_match.h (working copy)
@@ -134,6 +134,21 @@
int style,
ACMatchClassifications* classifications);
+ // Converts classifications to and from a serialized string representation
+ // (using comma-separated integers to sequentially list positions and styles).
+ static std::string ClassificationsToString(
+ const ACMatchClassifications& classifications);
+ static ACMatchClassifications ClassificationsFromString(
+ const std::string& serialized_classifications);
+
+ // Adds a classification to the end of |classifications| iff its style is
+ // different from the last existing classification. |offset| must be larger
+ // than the offset of the last classification in |classifications|.
+ static void AddLastClassificationIfNecessary(
+ ACMatchClassifications* classifications,
+ size_t offset,
+ int style);
+
// Removes invalid characters from |text|. Should be called on strings coming
// from external sources (such as extensions) before assigning to |contents|
// or |description|.
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_match.cc » ('j') | chrome/browser/autocomplete/shortcuts_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698