Chromium Code Reviews| 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. |