Index: chrome/browser/instant/instant_controller.cc |
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc |
index 2eefd0670edbc69df96796eeda0d7b2ef7730152..05bd169ebaa275455946f960b7c7dcc459a6dd53 100644 |
--- a/chrome/browser/instant/instant_controller.cc |
+++ b/chrome/browser/instant/instant_controller.cc |
@@ -406,31 +406,30 @@ bool InstantController::commit_on_pointer_release() const { |
void InstantController::SetSuggestions( |
InstantLoader* loader, |
- const std::vector<string16>& suggestions, |
- InstantCompleteBehavior behavior) { |
+ const std::vector<InstantSuggestion>& suggestions) { |
DCHECK_EQ(loader_.get(), loader); |
if (loader_ != loader || IsOutOfDate() || mode_ == SILENT || mode_ == HIDDEN) |
return; |
loader_processed_last_update_ = true; |
- string16 suggestion; |
+ InstantSuggestion suggestion; |
if (!suggestions.empty()) |
suggestion = suggestions[0]; |
- string16 suggestion_lower = base::i18n::ToLower(suggestion); |
+ string16 suggestion_lower = base::i18n::ToLower(suggestion.text); |
string16 user_text_lower = base::i18n::ToLower(last_user_text_); |
if (user_text_lower.size() >= suggestion_lower.size() || |
suggestion_lower.compare(0, user_text_lower.size(), user_text_lower)) { |
- suggestion.clear(); |
+ suggestion.text.clear(); |
} else { |
- suggestion.erase(0, last_user_text_.size()); |
+ suggestion.text.erase(0, last_user_text_.size()); |
} |
- last_suggestion_ = suggestion; |
- last_complete_behavior_ = behavior; |
+ last_suggestion_ = suggestion.text; |
+ last_complete_behavior_ = suggestion.behavior; |
if (!last_verbatim_) |
- delegate_->SetSuggestedText(suggestion, behavior); |
+ delegate_->SetSuggestedText(suggestion.text, suggestion.behavior); |
if (mode_ != SUGGEST) |
Show(); |