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/predictors/autocomplete_action_predictor.h" | 5 #include "chrome/browser/predictors/autocomplete_action_predictor.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 lower_user_text); | 122 lower_user_text); |
123 | 123 |
124 if (match_it == transitional_matches_.end()) { | 124 if (match_it == transitional_matches_.end()) { |
125 TransitionalMatch transitional_match; | 125 TransitionalMatch transitional_match; |
126 transitional_match.user_text = lower_user_text; | 126 transitional_match.user_text = lower_user_text; |
127 match_it = transitional_matches_.insert(transitional_matches_.end(), | 127 match_it = transitional_matches_.insert(transitional_matches_.end(), |
128 transitional_match); | 128 transitional_match); |
129 } | 129 } |
130 | 130 |
131 for (const auto& i : result) { | 131 for (const auto& i : result) { |
132 if (!ContainsValue(match_it->urls, i.destination_url)) | 132 if (!base::ContainsValue(match_it->urls, i.destination_url)) |
133 match_it->urls.push_back(i.destination_url); | 133 match_it->urls.push_back(i.destination_url); |
134 } | 134 } |
135 } | 135 } |
136 | 136 |
137 void AutocompleteActionPredictor::ClearTransitionalMatches() { | 137 void AutocompleteActionPredictor::ClearTransitionalMatches() { |
138 transitional_matches_.clear(); | 138 transitional_matches_.clear(); |
139 } | 139 } |
140 | 140 |
141 void AutocompleteActionPredictor::CancelPrerender() { | 141 void AutocompleteActionPredictor::CancelPrerender() { |
142 // If the prerender has already been abandoned, leave it to its own timeout; | 142 // If the prerender has already been abandoned, leave it to its own timeout; |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 AutocompleteActionPredictor::TransitionalMatch::TransitionalMatch() { | 589 AutocompleteActionPredictor::TransitionalMatch::TransitionalMatch() { |
590 } | 590 } |
591 | 591 |
592 AutocompleteActionPredictor::TransitionalMatch::TransitionalMatch( | 592 AutocompleteActionPredictor::TransitionalMatch::TransitionalMatch( |
593 const TransitionalMatch& other) = default; | 593 const TransitionalMatch& other) = default; |
594 | 594 |
595 AutocompleteActionPredictor::TransitionalMatch::~TransitionalMatch() { | 595 AutocompleteActionPredictor::TransitionalMatch::~TransitionalMatch() { |
596 } | 596 } |
597 | 597 |
598 } // namespace predictors | 598 } // namespace predictors |
OLD | NEW |