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

Unified Diff: chrome/browser/history/url_index_private_data.cc

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/history/url_index_private_data.cc
diff --git a/chrome/browser/history/url_index_private_data.cc b/chrome/browser/history/url_index_private_data.cc
index d592f171d2f1cd350800d13d828f94ebcc7fb647..cc392d6742a539a73cdd0d05d183131794500ce8 100644
--- a/chrome/browser/history/url_index_private_data.cc
+++ b/chrome/browser/history/url_index_private_data.cc
@@ -18,6 +18,7 @@
#include "base/i18n/case_conversion.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
+#include "base/strings/utf_offset_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "chrome/browser/autocomplete/autocomplete_provider.h"
@@ -757,8 +758,9 @@ void URLIndexPrivateData::AddRowWordsToIndex(const URLRow& row,
HistoryID history_id = static_cast<HistoryID>(row.id());
// Split URL into individual, unique words then add in the title words.
const GURL& gurl(row.url());
+ base::OffsetAdjuster::Adjustments adjustments;
const base::string16& url =
- bookmark_utils::CleanUpUrlForMatching(gurl, languages);
+ bookmark_utils::CleanUpUrlForMatching(gurl, languages, &adjustments);
Peter Kasting 2014/04/23 23:18:01 Nit: And another 2 in this file
Mark P 2014/04/24 14:05:02 Done.
String16Set url_words = String16SetFromString16(url,
word_starts ? &word_starts->url_word_starts_ : NULL);
const base::string16& title =
@@ -1240,8 +1242,9 @@ bool URLIndexPrivateData::RestoreWordStartsMap(
iter != history_info_map_.end(); ++iter) {
RowWordStarts word_starts;
const URLRow& row(iter->second.url_row);
- const base::string16& url =
- bookmark_utils::CleanUpUrlForMatching(row.url(), languages);
+ base::OffsetAdjuster::Adjustments adjustments;
+ const base::string16& url = bookmark_utils::CleanUpUrlForMatching(
+ row.url(), languages, &adjustments);
String16VectorFromString16(url, false, &word_starts.url_word_starts_);
const base::string16& title =
bookmark_utils::CleanUpTitleForMatching(row.title());

Powered by Google App Engine
This is Rietveld 408576698