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

Side by Side Diff: components/omnibox/autocomplete_result.cc

Issue 470523002: Componentize AutocompleteResult (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « components/omnibox/autocomplete_result.h ('k') | components/omnibox/autocomplete_result_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698