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

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

Issue 343523003: Remove AutocompleteInput Type and PageClassification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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/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 f2958b70df093baee014da0095a36ffd40b53f81..3c80f64ada88503e86b83f21a6903fe21ff7a8cc 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -67,6 +67,7 @@
#include "ui/gfx/image/image.h"
#include "url/url_util.h"
+using metrics::OmniboxEventProto;
using predictors::AutocompleteActionPredictor;
@@ -1426,31 +1427,31 @@ bool OmniboxEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) {
}
}
-AutocompleteInput::PageClassification OmniboxEditModel::ClassifyPage() const {
+OmniboxEventProto::PageClassification OmniboxEditModel::ClassifyPage() const {
if (!delegate_->CurrentPageExists())
- return AutocompleteInput::OTHER;
+ return OmniboxEventProto::OTHER;
if (delegate_->IsInstantNTP()) {
// Note that we treat OMNIBOX as the source if focus_source_ is INVALID,
// i.e., if input isn't actually in progress.
return (focus_source_ == FAKEBOX) ?
- AutocompleteInput::INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS :
- AutocompleteInput::INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS;
+ OmniboxEventProto::INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS :
+ OmniboxEventProto::INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS;
}
const GURL& gurl = delegate_->GetURL();
if (!gurl.is_valid())
- return AutocompleteInput::INVALID_SPEC;
+ return OmniboxEventProto::INVALID_SPEC;
const std::string& url = gurl.spec();
if (url == chrome::kChromeUINewTabURL)
- return AutocompleteInput::NTP;
+ return OmniboxEventProto::NTP;
if (url == url::kAboutBlankURL)
- return AutocompleteInput::BLANK;
+ return OmniboxEventProto::BLANK;
if (url == profile()->GetPrefs()->GetString(prefs::kHomePage))
- return AutocompleteInput::HOME_PAGE;
+ return OmniboxEventProto::HOME_PAGE;
if (controller_->GetToolbarModel()->WouldPerformSearchTermReplacement(true))
- return AutocompleteInput::SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT;
+ return OmniboxEventProto::SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT;
if (delegate_->IsSearchResultsPage())
- return AutocompleteInput::SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT;
- return AutocompleteInput::OTHER;
+ return OmniboxEventProto::SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT;
+ return OmniboxEventProto::OTHER;
}
void OmniboxEditModel::ClassifyStringForPasteAndGo(

Powered by Google App Engine
This is Rietveld 408576698