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

Unified Diff: chrome/browser/autocomplete/base_search_provider.cc

Issue 320713002: Revert of Omnibox: Combine Two Input Type Enums into One (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
Index: chrome/browser/autocomplete/base_search_provider.cc
diff --git a/chrome/browser/autocomplete/base_search_provider.cc b/chrome/browser/autocomplete/base_search_provider.cc
index 3de7d4126c3641dfdc2d2311144f8c5b075dbc26..3d47edadc95ad8d42459c129cb5354b3de578d87 100644
--- a/chrome/browser/autocomplete/base_search_provider.cc
+++ b/chrome/browser/autocomplete/base_search_provider.cc
@@ -29,7 +29,6 @@
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/common/net/url_fixer_upper.h"
#include "chrome/common/pref_names.h"
-#include "components/metrics/proto/omnibox_input_type.pb.h"
#include "components/sync_driver/sync_prefs.h"
#include "content/public/common/url_constants.h"
#include "net/base/escape.h"
@@ -338,7 +337,7 @@
bool keyword_provider_requested) const {
if (!from_keyword_provider_ && keyword_provider_requested)
return 100;
- return ((input.type() == metrics::OmniboxInputType::URL) ? 300 : 600);
+ return ((input.type() == AutocompleteInput::URL) ? 300 : 600);
}
// BaseSearchProvider::NavigationResult ----------------------------------------
@@ -519,7 +518,7 @@
// When the user forced a query, we need to make sure all the fill_into_edit
// values preserve that property. Otherwise, if the user starts editing a
// suggestion, non-Search results will suddenly appear.
- if (input.type() == metrics::OmniboxInputType::FORCED_QUERY)
+ if (input.type() == AutocompleteInput::FORCED_QUERY)
match.fill_into_edit.assign(base::ASCIIToUTF16("?"));
if (suggestion.from_keyword_provider())
match.fill_into_edit.append(match.keyword + base::char16(' '));
@@ -854,8 +853,7 @@
std::string type;
int relevance = GetDefaultResultRelevance();
// Prohibit navsuggest in FORCED_QUERY mode. Users wants queries, not URLs.
- const bool allow_navsuggest =
- input.type() != metrics::OmniboxInputType::FORCED_QUERY;
+ const bool allow_navsuggest = input.type() != AutocompleteInput::FORCED_QUERY;
const std::string languages(
profile_->GetPrefs()->GetString(prefs::kAcceptLanguages));
const base::string16& trimmed_input =
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_result.cc ('k') | chrome/browser/autocomplete/bookmark_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698