| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/omnibox/browser/bookmark_provider.h" | 5 #include "components/omnibox/browser/bookmark_provider.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" |
| 11 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 12 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 14 #include "components/bookmarks/browser/bookmark_match.h" | 15 #include "components/bookmarks/browser/bookmark_match.h" |
| 15 #include "components/bookmarks/browser/bookmark_model.h" | 16 #include "components/bookmarks/browser/bookmark_model.h" |
| 16 #include "components/metrics/proto/omnibox_input_type.pb.h" | 17 #include "components/metrics/proto/omnibox_input_type.pb.h" |
| 17 #include "components/omnibox/browser/autocomplete_provider_client.h" | 18 #include "components/omnibox/browser/autocomplete_provider_client.h" |
| 18 #include "components/omnibox/browser/autocomplete_result.h" | 19 #include "components/omnibox/browser/autocomplete_result.h" |
| 19 #include "components/omnibox/browser/history_provider.h" | 20 #include "components/omnibox/browser/history_provider.h" |
| 20 #include "components/omnibox/browser/url_prefix.h" | 21 #include "components/omnibox/browser/url_prefix.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 i != positions.end(); | 337 i != positions.end(); |
| 337 ++i) { | 338 ++i) { |
| 338 AutocompleteMatch::ACMatchClassifications new_class; | 339 AutocompleteMatch::ACMatchClassifications new_class; |
| 339 AutocompleteMatch::ClassifyLocationInString(i->first, i->second - i->first, | 340 AutocompleteMatch::ClassifyLocationInString(i->first, i->second - i->first, |
| 340 text_length, url_style, &new_class); | 341 text_length, url_style, &new_class); |
| 341 classifications = AutocompleteMatch::MergeClassifications( | 342 classifications = AutocompleteMatch::MergeClassifications( |
| 342 classifications, new_class); | 343 classifications, new_class); |
| 343 } | 344 } |
| 344 return classifications; | 345 return classifications; |
| 345 } | 346 } |
| OLD | NEW |