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

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

Issue 2879703002: WebView: Add channel info for UMA (Closed)
Patch Set: rebase Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package com.android.webview.chromium; 5 package com.android.webview.chromium;
6 6
7 import android.Manifest; 7 import android.Manifest;
8 import android.app.ActivityManager; 8 import android.app.ActivityManager;
9 import android.content.ComponentCallbacks2; 9 import android.content.ComponentCallbacks2;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 final PackageInfo webViewPackageInfo = WebViewFactory.getLoadedPackageIn fo(); 410 final PackageInfo webViewPackageInfo = WebViewFactory.getLoadedPackageIn fo();
411 final String webViewPackageName = webViewPackageInfo.packageName; 411 final String webViewPackageName = webViewPackageInfo.packageName;
412 final Context context = ContextUtils.getApplicationContext(); 412 final Context context = ContextUtils.getApplicationContext();
413 setUpResources(webViewPackageInfo, context); 413 setUpResources(webViewPackageInfo, context);
414 initPlatSupportLibrary(); 414 initPlatSupportLibrary();
415 doNetworkInitializations(context); 415 doNetworkInitializations(context);
416 final boolean isExternalService = true; 416 final boolean isExternalService = true;
417 // The WebView package name is used to locate the separate Service to wh ich we copy crash 417 // The WebView package name is used to locate the separate Service to wh ich we copy crash
418 // minidumps. This package name must be set before a render process has a chance to crash - 418 // minidumps. This package name must be set before a render process has a chance to crash -
419 // otherwise we might try to copy a minidump without knowing what proces s to copy it to. 419 // otherwise we might try to copy a minidump without knowing what proces s to copy it to.
420 // It's also used to determine channel for UMA, so it must be set before initializing UMA.
420 AwBrowserProcess.setWebViewPackageName(webViewPackageName); 421 AwBrowserProcess.setWebViewPackageName(webViewPackageName);
421 AwBrowserProcess.configureChildProcessLauncher(webViewPackageName, isExt ernalService); 422 AwBrowserProcess.configureChildProcessLauncher(webViewPackageName, isExt ernalService);
422 AwBrowserProcess.start(); 423 AwBrowserProcess.start();
423 AwBrowserProcess.handleMinidumpsAndSetMetricsConsent( 424 AwBrowserProcess.handleMinidumpsAndSetMetricsConsent(
424 webViewPackageName, true /* updateMetricsConsent */); 425 webViewPackageName, true /* updateMetricsConsent */);
425 426
426 if (CommandLineUtil.isBuildDebuggable()) { 427 if (CommandLineUtil.isBuildDebuggable()) {
427 setWebContentsDebuggingEnabled(true); 428 setWebContentsDebuggingEnabled(true);
428 } 429 }
429 430
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 WebViewDelegate getWebViewDelegate() { 703 WebViewDelegate getWebViewDelegate() {
703 return mWebViewDelegate; 704 return mWebViewDelegate;
704 } 705 }
705 706
706 // The method to support unreleased Android. 707 // The method to support unreleased Android.
707 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV iew, 708 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV iew,
708 Context context) { 709 Context context) {
709 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega te); 710 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega te);
710 } 711 }
711 } 712 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698