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

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

Issue 19810002: Omnibox Logging: Record Whether User Was on a Search Result Page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: consistency Created 7 years, 5 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 | « no previous file | chrome/common/metrics/proto/omnibox_event.proto » ('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 6b54a7224754bdc202a6787aff456018ed6cb44f..0f349b00f13533f35fccbea2e051c3723137f110 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -1267,20 +1267,24 @@ bool OmniboxEditModel::IsSpaceCharForAcceptingKeyword(wchar_t c) {
metrics::OmniboxEventProto::PageClassification
OmniboxEditModel::ClassifyPage() const {
if (!delegate_->CurrentPageExists())
- return metrics::OmniboxEventProto_PageClassification_OTHER;
+ return metrics::OmniboxEventProto::OTHER;
if (delegate_->IsInstantNTP())
- return metrics::OmniboxEventProto_PageClassification_INSTANT_NEW_TAB_PAGE;
+ return metrics::OmniboxEventProto::INSTANT_NEW_TAB_PAGE;
const GURL& gurl = delegate_->GetURL();
if (!gurl.is_valid())
- return metrics::OmniboxEventProto_PageClassification_INVALID_SPEC;
+ return metrics::OmniboxEventProto::INVALID_SPEC;
const std::string& url = gurl.spec();
if (url == chrome::kChromeUINewTabURL)
- return metrics::OmniboxEventProto_PageClassification_NEW_TAB_PAGE;
+ return metrics::OmniboxEventProto::NEW_TAB_PAGE;
if (url == content::kAboutBlankURL)
- return metrics::OmniboxEventProto_PageClassification_BLANK;
+ return metrics::OmniboxEventProto::BLANK;
if (url == profile()->GetPrefs()->GetString(prefs::kHomePage))
- return metrics::OmniboxEventProto_PageClassification_HOMEPAGE;
- return metrics::OmniboxEventProto_PageClassification_OTHER;
+ return metrics::OmniboxEventProto::HOMEPAGE;
+ if (view_->toolbar_model()->WouldReplaceSearchURLWithSearchTerms(true)) {
+ return metrics::
+ OmniboxEventProto::SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT;
+ }
+ return metrics::OmniboxEventProto::OTHER;
}
void OmniboxEditModel::ClassifyStringForPasteAndGo(
« no previous file with comments | « no previous file | chrome/common/metrics/proto/omnibox_event.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698