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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java

Issue 1474483004: WebView Metrics client implementation (Chromium part) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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/java/src/org/chromium/android_webview/AwBrowserContext.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java
index 244dfedbdbc6975bb913352eb952cdddb838a3b5..951dfec21a927d19063e4d58bb06ad510ffd27df 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java
@@ -20,14 +20,18 @@ public class AwBrowserContext {
private static final String HTTP_AUTH_DATABASE_FILE = "http_auth.db";
private final SharedPreferences mSharedPreferences;
+ private Context mApplicationContext;
sgurun-gerrit only 2015/12/11 00:06:45 drop
paulmiller 2015/12/18 00:15:49 fixed
private AwGeolocationPermissions mGeolocationPermissions;
private AwFormDatabase mFormDatabase;
private HttpAuthDatabase mHttpAuthDatabase;
private AwMessagePortService mMessagePortService;
+ private AwMetricsServiceClient mMetricsServiceClient;
public AwBrowserContext(SharedPreferences sharedPreferences, Context applicationContext) {
mSharedPreferences = sharedPreferences;
+ mApplicationContext = applicationContext;
sgurun-gerrit only 2015/12/11 00:06:45 drop
paulmiller 2015/12/18 00:15:49 fixed
+ getMetricsServiceClient();
sgurun-gerrit only 2015/12/11 00:06:45 do a mMetricsServiceClient = new MetricsServiceCl
paulmiller 2015/12/18 00:15:49 fixed
}
public AwGeolocationPermissions getGeolocationPermissions() {
@@ -58,6 +62,13 @@ public class AwBrowserContext {
return mMessagePortService;
}
+ public AwMetricsServiceClient getMetricsServiceClient() {
+ if (mMetricsServiceClient == null) {
+ mMetricsServiceClient = new AwMetricsServiceClient(mApplicationContext);
+ }
+ return mMetricsServiceClient;
sgurun-gerrit only 2015/12/11 00:06:45 drop the if, simply return mMetricsServiceClient
paulmiller 2015/12/18 00:15:49 fixed
+ }
+
/**
* @see android.webkit.WebView#pauseTimers()
*/

Powered by Google App Engine
This is Rietveld 408576698