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 "chrome/browser/autocomplete/autocomplete_result.h" | 5 #include "components/omnibox/autocomplete_result.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "components/metrics/proto/omnibox_event.pb.h" | 13 #include "components/metrics/proto/omnibox_event.pb.h" |
14 #include "components/metrics/proto/omnibox_input_type.pb.h" | 14 #include "components/metrics/proto/omnibox_input_type.pb.h" |
15 #include "components/omnibox/autocomplete_input.h" | 15 #include "components/omnibox/autocomplete_input.h" |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 i != old_matches.rend() && delta > 0; ++i) { | 457 i != old_matches.rend() && delta > 0; ++i) { |
458 if (!HasMatchByDestination(*i, new_matches)) { | 458 if (!HasMatchByDestination(*i, new_matches)) { |
459 AutocompleteMatch match = *i; | 459 AutocompleteMatch match = *i; |
460 match.relevance = std::min(max_relevance, match.relevance); | 460 match.relevance = std::min(max_relevance, match.relevance); |
461 match.from_previous = true; | 461 match.from_previous = true; |
462 matches_.push_back(match); | 462 matches_.push_back(match); |
463 delta--; | 463 delta--; |
464 } | 464 } |
465 } | 465 } |
466 } | 466 } |
OLD | NEW |