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

Unified Diff: components/bookmarks/browser/titled_url_match.h

Issue 2583763003: Factor out AutocompleteMatch creation from BookmarkProvider (Closed)
Patch Set: add unit test Created 4 years 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: components/bookmarks/browser/titled_url_match.h
diff --git a/components/bookmarks/browser/titled_url_match.h b/components/bookmarks/browser/titled_url_match.h
index 767a1907d0613dcc90a0c423bedf52f2ecd7b797..6781139d4b7b169f4254978ddfc3a93da00303c8 100644
--- a/components/bookmarks/browser/titled_url_match.h
+++ b/components/bookmarks/browser/titled_url_match.h
@@ -11,6 +11,8 @@
#include <utility>
#include <vector>
+#include "base/strings/string16.h"
+
namespace bookmarks {
class TitledUrlNode;
@@ -36,6 +38,12 @@ struct TitledUrlMatch {
const MatchPositions& match_positions,
const std::vector<size_t>& offsets);
+ // Removes leading spaces from |title| before displaying, otherwise it looks
+ // funny. In the process, corrects |title_match_positions| so the correct
+ // characters are highlighted.
+ static void CorrectTitleAndMatchPositions(
+ base::string16* title, MatchPositions* title_match_positions);
Mark P 2016/12/23 22:38:49 nit: This parameter spacing looks odd to me. Did
mattreynolds 2017/01/04 00:58:02 Done.
+
// The matching node of a query.
const TitledUrlNode* node;

Powered by Google App Engine
This is Rietveld 408576698