Index: components/omnibox/browser/bookmark_provider.cc |
diff --git a/components/omnibox/browser/bookmark_provider.cc b/components/omnibox/browser/bookmark_provider.cc |
index f9d3bde21f158ce68b65bf99132ee8655ad51fae..d61f11b6ceed6ea99de2ded7835bfc0e620bba1c 100644 |
--- a/components/omnibox/browser/bookmark_provider.cc |
+++ b/components/omnibox/browser/bookmark_provider.cc |
@@ -57,12 +57,7 @@ void CorrectTitleAndMatchPositions( |
BookmarkProvider::BookmarkProvider(AutocompleteProviderClient* client) |
: AutocompleteProvider(AutocompleteProvider::TYPE_BOOKMARK), |
client_(client), |
- bookmark_model_(NULL) { |
- if (client_) { |
- bookmark_model_ = client_->GetBookmarkModel(); |
- languages_ = client_->GetAcceptLanguages(); |
- } |
-} |
+ bookmark_model_(client ? client_->GetBookmarkModel() : nullptr) {} |
void BookmarkProvider::Start(const AutocompleteInput& input, |
bool minimal_changes) { |
@@ -192,8 +187,8 @@ AutocompleteMatch BookmarkProvider::BookmarkMatchToACMatch( |
// end. |
offsets.push_back(inline_autocomplete_offset); |
match.contents = url_formatter::FormatUrlWithOffsets( |
- url, languages_, url_formatter::kFormatUrlOmitAll & |
- ~(trim_http ? 0 : url_formatter::kFormatUrlOmitHTTP), |
+ url, url_formatter::kFormatUrlOmitAll & |
+ ~(trim_http ? 0 : url_formatter::kFormatUrlOmitHTTP), |
net::UnescapeRule::SPACES, nullptr, nullptr, &offsets); |
inline_autocomplete_offset = offsets.back(); |
offsets.pop_back(); |