OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.ntp; | 5 package org.chromium.chrome.browser.ntp; |
6 | 6 |
7 import org.chromium.base.metrics.RecordHistogram; | 7 import org.chromium.base.metrics.RecordHistogram; |
8 import org.chromium.base.metrics.RecordUserAction; | 8 import org.chromium.base.metrics.RecordUserAction; |
9 import org.chromium.chrome.browser.UrlUtilities; | 9 import org.chromium.chrome.browser.UrlUtilities; |
10 import org.chromium.ui.base.PageTransition; | 10 import org.chromium.ui.base.PageTransition; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 public static void recordOmniboxNavigation(String destinationUrl, int transi
tionType) { | 69 public static void recordOmniboxNavigation(String destinationUrl, int transi
tionType) { |
70 if ((transitionType & PageTransition.CORE_MASK) == PageTransition.GENERA
TED) { | 70 if ((transitionType & PageTransition.CORE_MASK) == PageTransition.GENERA
TED) { |
71 recordAction(ACTION_SEARCHED_USING_OMNIBOX); | 71 recordAction(ACTION_SEARCHED_USING_OMNIBOX); |
72 } else if (UrlUtilities.nativeIsGoogleHomePageUrl(destinationUrl)) { | 72 } else if (UrlUtilities.nativeIsGoogleHomePageUrl(destinationUrl)) { |
73 recordAction(ACTION_NAVIGATED_TO_GOOGLE_HOMEPAGE); | 73 recordAction(ACTION_NAVIGATED_TO_GOOGLE_HOMEPAGE); |
74 } else { | 74 } else { |
75 recordAction(ACTION_NAVIGATED_USING_OMNIBOX); | 75 recordAction(ACTION_NAVIGATED_USING_OMNIBOX); |
76 } | 76 } |
77 } | 77 } |
78 } | 78 } |
OLD | NEW |