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

Unified Diff: chrome/browser/bookmarks/bookmark_utils.h

Issue 255423002: Omnibox: Highlight Matches in URLs Properly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: spacing Created 6 years, 8 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/bookmarks/bookmark_utils.h
diff --git a/chrome/browser/bookmarks/bookmark_utils.h b/chrome/browser/bookmarks/bookmark_utils.h
index 9eecedbb678318f2d3b6927ad12b366d4edade10..4af6cc6ca48d52af5bc3310f60c6f1f4e1363df7 100644
--- a/chrome/browser/bookmarks/bookmark_utils.h
+++ b/chrome/browser/bookmarks/bookmark_utils.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/strings/string16.h"
+#include "base/strings/utf_offset_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_node_data.h"
class BookmarkModel;
@@ -109,16 +110,19 @@ void AddIfNotBookmarked(BookmarkModel* model,
// Removes all bookmarks for the given |url|.
void RemoveAllBookmarks(BookmarkModel* model, const GURL& url);
-// Truncates an overly-long URL, unescapes it, and lower-cases it,
-// returning the result. This unescaping makes it possible to match
-// substrings that were originally escaped for navigation; for
-// example, if the user searched for "a&p", the query would be escaped
-// as "a%26p", so without unescaping, an input string of "a&p" would
-// no longer match this URL. Note that the resulting unescaped URL
-// may not be directly navigable (which is why we escaped it to begin
-// with). |languages| is passed to net::FormatUrl().
-base::string16 CleanUpUrlForMatching(const GURL& gurl,
- const std::string& languages);
+// Truncates an overly-long URL, unescapes it, and lower-cases it, returning
+// the result. |adjustments| is set to reflect the transformations that make
+// the URL spec underwent to become the return value. This unescaping makes
Peter Kasting 2014/04/23 23:18:01 "that make the URL spec underwent"?
Mark P 2014/04/24 14:05:02 Done. Also rewrite much of the test of the commen
+// it possible to match substrings that were originally escaped for navigation;
+// for example, if the user searched for "a&p", the query would be escaped as
+// "a%26p", so without unescaping, an input string of "a&p" would no longer
+// match this URL. Note that the resulting unescaped URL may not be directly
+// navigable (which is why it was escaped to begin with). |languages| is
+// passed to net::FormatUrl().
+base::string16 CleanUpUrlForMatching(
+ const GURL& gurl,
+ const std::string& languages,
+ base::OffsetAdjuster::Adjustments* adjustments);
// Returns the lower-cased title, possibly truncated if the original title
// is overly-long.

Powered by Google App Engine
This is Rietveld 408576698