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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.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/PhysicalWebBleClient.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java
index 01918a30528c9369d8366497acf330f51597ff1d..233bbb74999a37d2813f9a383cceab805cabbe78 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java
@@ -6,6 +6,7 @@ package org.chromium.chrome.browser.physicalweb;
import android.app.Activity;
+import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.chrome.browser.ChromeApplication;
@@ -21,14 +22,13 @@ public class PhysicalWebBleClient {
/**
* Get a singleton instance of this class.
- * @param chromeApplication An instance of {@link ChromeApplication}, used to get the
- * appropriate PhysicalWebBleClient implementation.
* @return an instance of this class (or subclass) as decided by the
* application parameter
*/
- public static PhysicalWebBleClient getInstance(ChromeApplication chromeApplication) {
+ public static PhysicalWebBleClient getInstance() {
if (sInstance == null) {
- sInstance = chromeApplication.createPhysicalWebBleClient();
+ sInstance = ((ChromeApplication) ContextUtils.getApplicationContext())
+ .createPhysicalWebBleClient();
}
return sInstance;
}

Powered by Google App Engine
This is Rietveld 408576698