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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java

Issue 2108983002: Use ContextUtils in PhysicalWeb (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java
index c28da2d48c38181833c13acf0f0ec66aefbfde4a..89bbaccdbfe7a4cb9eadc6e34669c5981f7f8181 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java
@@ -197,12 +197,12 @@ public class PhysicalWebUma {
switch (referer) {
case ListUrlsActivity.NOTIFICATION_REFERER:
handleTime(context, STANDARD_NOTIFICATION_PRESS_DELAYS,
- UrlManager.getInstance(context).getTimeSinceNotificationUpdate(),
+ UrlManager.getInstance().getTimeSinceNotificationUpdate(),
TimeUnit.MILLISECONDS);
break;
case ListUrlsActivity.OPTIN_REFERER:
handleTime(context, OPT_IN_NOTIFICATION_PRESS_DELAYS,
- UrlManager.getInstance(context).getTimeSinceNotificationUpdate(),
+ UrlManager.getInstance().getTimeSinceNotificationUpdate(),
TimeUnit.MILLISECONDS);
break;
case ListUrlsActivity.PREFERENCE_REFERER:
@@ -235,8 +235,8 @@ public class PhysicalWebUma {
handleEnum(context, createStateString(DATA_CONNECTION, actionName),
Utils.isDataConnectionActive(context) ? 1 : 0, BOOLEAN_BOUNDARY);
int preferenceState = 2;
- if (!PhysicalWeb.isOnboarding(context)) {
- preferenceState = PhysicalWeb.isPhysicalWebPreferenceEnabled(context) ? 1 : 0;
+ if (!PhysicalWeb.isOnboarding()) {
+ preferenceState = PhysicalWeb.isPhysicalWebPreferenceEnabled() ? 1 : 0;
}
handleEnum(context, createStateString(PREFERENCE, actionName),
preferenceState, TRISTATE_BOUNDARY);
@@ -247,7 +247,7 @@ public class PhysicalWebUma {
* Additionally, this method will cause future stat records not to be deferred and instead
* uploaded immediately.
*/
- public static void uploadDeferredMetrics(Context context) {
+ public static void uploadDeferredMetrics() {
// If uploads have been explicitely requested, they are now allowed.
sUploadAllowed = true;

Powered by Google App Engine
This is Rietveld 408576698