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

Unified Diff: android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java

Issue 2787963003: WebView: Refactor PlatformServiceBridge.getInstance (Closed)
Patch Set: make injectInstance less picky Created 3 years, 9 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: android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
index dd5951fda786f115e10b37f5630957a80a43c4a7..8c6d1e5ed8574190f4e0b1de1d11f6f9d1706a80 100644
--- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
+++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
@@ -420,8 +420,8 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
}
// Actions conditioned on whether the Android Checkbox is toggled on
timvolodine 2017/04/03 12:18:52 perhaps also provide a comment that the "createIns
paulmiller 2017/04/03 23:34:16 Done.
- PlatformServiceBridge.getInstance(context)
- .queryMetricsSetting(new ValueCallback<Boolean>() {
+ PlatformServiceBridge.createInstance(context).queryMetricsSetting(
Tobias Sargeant 2017/04/03 10:40:06 Keep this getInstance() and add a createInstance()
paulmiller 2017/04/03 23:34:16 IMHO, if we preemptively create our singletons as
Tobias Sargeant 2017/04/04 12:30:47 Is create-on-first-use really that much of a benef
+ new ValueCallback<Boolean>() {
public void onReceiveValue(Boolean enabled) {
ThreadUtils.assertOnUiThread();
AwMetricsServiceClient.setConsentSetting(context, enabled);

Powered by Google App Engine
This is Rietveld 408576698