| 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 70833e992478e19fd5cfe3c1d7b6cde97c0251a1..7da50a2dc2ae7f2950bbeff794435deb70c63933 100644
|
| --- a/chrome/browser/autocomplete/base_search_provider.cc
|
| +++ b/chrome/browser/autocomplete/base_search_provider.cc
|
| @@ -29,6 +29,7 @@
|
| #include "chrome/browser/sync/profile_sync_service_factory.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "components/autocomplete/url_prefix.h"
|
| +#include "components/metrics/proto/omnibox_event.pb.h"
|
| #include "components/metrics/proto/omnibox_input_type.pb.h"
|
| #include "components/sync_driver/sync_prefs.h"
|
| #include "components/url_fixer/url_fixer.h"
|
| @@ -41,6 +42,8 @@
|
| #include "net/url_request/url_fetcher_delegate.h"
|
| #include "url/gurl.h"
|
|
|
| +using metrics::OmniboxEventProto;
|
| +
|
| namespace {
|
|
|
| AutocompleteMatchType::Type GetAutocompleteMatchType(const std::string& type) {
|
| @@ -586,7 +589,7 @@ scoped_ptr<base::Value> BaseSearchProvider::DeserializeJsonData(
|
| bool BaseSearchProvider::ZeroSuggestEnabled(
|
| const GURL& suggest_url,
|
| const TemplateURL* template_url,
|
| - AutocompleteInput::PageClassification page_classification,
|
| + OmniboxEventProto::PageClassification page_classification,
|
| Profile* profile) {
|
| if (!OmniboxFieldTrial::InZeroSuggestFieldTrial())
|
| return false;
|
| @@ -600,9 +603,9 @@ bool BaseSearchProvider::ZeroSuggestEnabled(
|
| // TODO(hfung): Experiment with showing MostVisited zero suggest on NTP
|
| // under the conditions described in crbug.com/305366.
|
| if ((page_classification ==
|
| - AutocompleteInput::INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS) ||
|
| + OmniboxEventProto::INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS) ||
|
| (page_classification ==
|
| - AutocompleteInput::INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS))
|
| + OmniboxEventProto::INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS))
|
| return false;
|
|
|
| // Don't run if there's no profile or in incognito mode.
|
| @@ -631,7 +634,7 @@ bool BaseSearchProvider::CanSendURL(
|
| const GURL& current_page_url,
|
| const GURL& suggest_url,
|
| const TemplateURL* template_url,
|
| - AutocompleteInput::PageClassification page_classification,
|
| + OmniboxEventProto::PageClassification page_classification,
|
| Profile* profile) {
|
| if (!ZeroSuggestEnabled(suggest_url, template_url, page_classification,
|
| profile))
|
|
|