Chromium Code Reviews| Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| index 7eb7f86201c11dd118cf86e6316b8388808943c0..ae92a29c276f012cdf01347d59319095968cf485 100644 |
| --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| @@ -16,6 +16,7 @@ |
| #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" |
| #include "chrome/browser/autocomplete/autocomplete_input.h" |
| #include "chrome/browser/autocomplete/autocomplete_log.h" |
| +#include "chrome/browser/autocomplete/autocomplete_provider.h" |
| #include "chrome/browser/autocomplete/extension_app_provider.h" |
| #include "chrome/browser/autocomplete/keyword_provider.h" |
| #include "chrome/browser/autocomplete/search_provider.h" |
| @@ -84,7 +85,11 @@ OmniboxEditModel::OmniboxEditModel(OmniboxView* view, |
| OmniboxEditController* controller, |
| Profile* profile) |
| : ALLOW_THIS_IN_INITIALIZER_LIST( |
|
Peter Kasting
2012/09/07 23:23:02
Nit: How about reducing the vertical whitespace sl
Daniel Erat
2012/09/08 16:37:36
Done (although this will never look non-broken to
|
| - autocomplete_controller_(new AutocompleteController(profile, this))), |
| + autocomplete_controller_( |
| + new AutocompleteController( |
| + profile, |
| + this, |
| + AutocompleteClassifier::kDefaultOmniboxProviders))), |
| view_(view), |
| popup_(NULL), |
| controller_(controller), |
| @@ -526,7 +531,8 @@ void OmniboxEditModel::OpenMatch(const AutocompleteMatch& match, |
| base::TimeTicks::Now() - time_user_first_modified_omnibox_, |
| 0, // inline autocomplete length; possibly set later |
| result()); |
| - DCHECK(user_input_in_progress_ || match.provider->name() == "ZeroSuggest") |
| + DCHECK(user_input_in_progress_ || |
| + match.provider->type() == AutocompleteProvider::TYPE_ZERO_SUGGEST) |
| << "We didn't get here through the expected series of calls. " |
| << "time_user_first_modified_omnibox_ is not set correctly and other " |
| << "things may be wrong. Match provider: " << match.provider->name(); |