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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 10909130: autocomplete: Add AutocompleteProvider::Type enum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add !! for windows Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/app_list/search_builder.cc ('k') | chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4113dcad040dcdb8af774acda8739a0013fc039d 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,8 @@ OmniboxEditModel::OmniboxEditModel(OmniboxView* view,
OmniboxEditController* controller,
Profile* profile)
: ALLOW_THIS_IN_INITIALIZER_LIST(
- autocomplete_controller_(new AutocompleteController(profile, this))),
+ autocomplete_controller_(new AutocompleteController(profile, this,
+ AutocompleteClassifier::kDefaultOmniboxProviders))),
view_(view),
popup_(NULL),
controller_(controller),
@@ -526,10 +528,11 @@ 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();
+ << "things may be wrong. Match provider: " << match.provider->GetName();
if (index != OmniboxPopupModel::kNoMatch)
log.selected_index = index;
else if (!has_temporary_text_)
« no previous file with comments | « chrome/browser/ui/app_list/search_builder.cc ('k') | chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698