| 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.document; | 5 package org.chromium.chrome.browser.document; |
| 6 | 6 |
| 7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
| 9 import android.app.Activity; | 9 import android.app.Activity; |
| 10 import android.app.ActivityManager; | 10 import android.app.ActivityManager; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 import org.chromium.chrome.browser.IntentHandler.TabOpenType; | 42 import org.chromium.chrome.browser.IntentHandler.TabOpenType; |
| 43 import org.chromium.chrome.browser.ShortcutHelper; | 43 import org.chromium.chrome.browser.ShortcutHelper; |
| 44 import org.chromium.chrome.browser.ShortcutSource; | 44 import org.chromium.chrome.browser.ShortcutSource; |
| 45 import org.chromium.chrome.browser.UrlConstants; | 45 import org.chromium.chrome.browser.UrlConstants; |
| 46 import org.chromium.chrome.browser.WarmupManager; | 46 import org.chromium.chrome.browser.WarmupManager; |
| 47 import org.chromium.chrome.browser.customtabs.CustomTabActivity; | 47 import org.chromium.chrome.browser.customtabs.CustomTabActivity; |
| 48 import org.chromium.chrome.browser.customtabs.CustomTabIntentDataProvider; | 48 import org.chromium.chrome.browser.customtabs.CustomTabIntentDataProvider; |
| 49 import org.chromium.chrome.browser.customtabs.SeparateTaskCustomTabActivity; | 49 import org.chromium.chrome.browser.customtabs.SeparateTaskCustomTabActivity; |
| 50 import org.chromium.chrome.browser.externalnav.IntentWithGesturesHandler; | 50 import org.chromium.chrome.browser.externalnav.IntentWithGesturesHandler; |
| 51 import org.chromium.chrome.browser.firstrun.FirstRunFlowSequencer; | 51 import org.chromium.chrome.browser.firstrun.FirstRunFlowSequencer; |
| 52 import org.chromium.chrome.browser.metrics.LaunchFromNotificationUMA; |
| 52 import org.chromium.chrome.browser.metrics.LaunchMetrics; | 53 import org.chromium.chrome.browser.metrics.LaunchMetrics; |
| 53 import org.chromium.chrome.browser.metrics.StartupMetrics; | 54 import org.chromium.chrome.browser.metrics.StartupMetrics; |
| 54 import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; | 55 import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; |
| 55 import org.chromium.chrome.browser.notifications.NotificationUIManager; | 56 import org.chromium.chrome.browser.notifications.NotificationUIManager; |
| 56 import org.chromium.chrome.browser.partnercustomizations.HomepageManager; | 57 import org.chromium.chrome.browser.partnercustomizations.HomepageManager; |
| 57 import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomiza
tions; | 58 import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomiza
tions; |
| 58 import org.chromium.chrome.browser.preferences.ChromePreferenceManager; | 59 import org.chromium.chrome.browser.preferences.ChromePreferenceManager; |
| 59 import org.chromium.chrome.browser.preferences.DocumentModeManager; | 60 import org.chromium.chrome.browser.preferences.DocumentModeManager; |
| 60 import org.chromium.chrome.browser.tab.Tab; | 61 import org.chromium.chrome.browser.tab.Tab; |
| 61 import org.chromium.chrome.browser.tab.TabIdManager; | 62 import org.chromium.chrome.browser.tab.TabIdManager; |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 */ | 978 */ |
| 978 private void recordIntentMetrics() { | 979 private void recordIntentMetrics() { |
| 979 Intent intent = getIntent(); | 980 Intent intent = getIntent(); |
| 980 IntentHandler.ExternalAppId source = | 981 IntentHandler.ExternalAppId source = |
| 981 IntentHandler.determineExternalIntentSource(getPackageName(), in
tent); | 982 IntentHandler.determineExternalIntentSource(getPackageName(), in
tent); |
| 982 if (intent.getPackage() == null && source != IntentHandler.ExternalAppId
.CHROME) { | 983 if (intent.getPackage() == null && source != IntentHandler.ExternalAppId
.CHROME) { |
| 983 int flagsOfInterest = Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_AC
TIVITY_NEW_DOCUMENT; | 984 int flagsOfInterest = Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_AC
TIVITY_NEW_DOCUMENT; |
| 984 int maskedFlags = intent.getFlags() & flagsOfInterest; | 985 int maskedFlags = intent.getFlags() & flagsOfInterest; |
| 985 sIntentFlagsHistogram.record(maskedFlags); | 986 sIntentFlagsHistogram.record(maskedFlags); |
| 986 } | 987 } |
| 988 LaunchFromNotificationUMA.recordSource(intent); |
| 987 } | 989 } |
| 988 } | 990 } |
| OLD | NEW |