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

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: Update tests to use new methods Created 4 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
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 eb672dd9cdfb42e33ac4a6ef171502f18cb43458..1267b7a2528981d15806b16c73fa44c7f271de8d 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
@@ -198,12 +198,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:
@@ -237,8 +237,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);
@@ -249,7 +249,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