OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 org.chromium.chrome.browser.metrics; | 5 package org.chromium.chrome.browser.metrics; |
6 | 6 |
7 import org.chromium.base.metrics.RecordHistogram; | 7 import org.chromium.base.metrics.RecordHistogram; |
8 import org.chromium.webapk.lib.common.WebApkConstants; | 8 import org.chromium.webapk.lib.common.WebApkConstants; |
9 | 9 |
10 import java.util.concurrent.TimeUnit; | 10 import java.util.concurrent.TimeUnit; |
(...skipping 21 matching lines...) Expand all Loading... |
32 public static final int GOOGLE_PLAY_INSTALL_FAILED_NO_DELEGATE = 1; | 32 public static final int GOOGLE_PLAY_INSTALL_FAILED_NO_DELEGATE = 1; |
33 public static final int GOOGLE_PLAY_INSTALL_FAILED_TO_CONNECT_TO_SERVICE = 2
; | 33 public static final int GOOGLE_PLAY_INSTALL_FAILED_TO_CONNECT_TO_SERVICE = 2
; |
34 public static final int GOOGLE_PLAY_INSTALL_FAILED_CALLER_VERIFICATION_FAILU
RE = 3; | 34 public static final int GOOGLE_PLAY_INSTALL_FAILED_CALLER_VERIFICATION_FAILU
RE = 3; |
35 public static final int GOOGLE_PLAY_INSTALL_FAILED_POLICY_VIOLATION = 4; | 35 public static final int GOOGLE_PLAY_INSTALL_FAILED_POLICY_VIOLATION = 4; |
36 public static final int GOOGLE_PLAY_INSTALL_FAILED_API_DISABLED = 5; | 36 public static final int GOOGLE_PLAY_INSTALL_FAILED_API_DISABLED = 5; |
37 public static final int GOOGLE_PLAY_INSTALL_FAILED_REQUEST_FAILED = 6; | 37 public static final int GOOGLE_PLAY_INSTALL_FAILED_REQUEST_FAILED = 6; |
38 public static final int GOOGLE_PLAY_INSTALL_FAILED_DOWNLOAD_CANCELLED = 7; | 38 public static final int GOOGLE_PLAY_INSTALL_FAILED_DOWNLOAD_CANCELLED = 7; |
39 public static final int GOOGLE_PLAY_INSTALL_FAILED_DOWNLOAD_ERROR = 8; | 39 public static final int GOOGLE_PLAY_INSTALL_FAILED_DOWNLOAD_ERROR = 8; |
40 public static final int GOOGLE_PLAY_INSTALL_FAILED_INSTALL_ERROR = 9; | 40 public static final int GOOGLE_PLAY_INSTALL_FAILED_INSTALL_ERROR = 9; |
41 public static final int GOOGLE_PLAY_INSTALL_FAILED_INSTALL_TIMEOUT = 10; | 41 public static final int GOOGLE_PLAY_INSTALL_FAILED_INSTALL_TIMEOUT = 10; |
42 public static final int GOOGLE_PLAY_INSTALL_RESULT_MAX = 11; | 42 public static final int GOOGLE_PLAY_INSTALL_REQUEST_FAILED_POLICY_DISABLED =
11; |
| 43 public static final int GOOGLE_PLAY_INSTALL_REQUEST_FAILED_UNKNOWN_ACCOUNT =
12; |
| 44 public static final int GOOGLE_PLAY_INSTALL_REQUEST_FAILED_NETWORK_ERROR = 1
3; |
| 45 public static final int GOOGLE_PLAY_INSTALL_REQUSET_FAILED_RESOLVE_ERROR = 1
4; |
| 46 public static final int GOOGLE_PLAY_INSTALL_RESULT_MAX = 14; |
43 | 47 |
44 public static final String HISTOGRAM_UPDATE_REQUEST_SENT = | 48 public static final String HISTOGRAM_UPDATE_REQUEST_SENT = |
45 "WebApk.Update.RequestSent"; | 49 "WebApk.Update.RequestSent"; |
46 | 50 |
47 public static final String HISTOGRAM_UPDATE_REQUEST_QUEUED = "WebApk.Update.
RequestQueued"; | 51 public static final String HISTOGRAM_UPDATE_REQUEST_QUEUED = "WebApk.Update.
RequestQueued"; |
48 | 52 |
49 private static final int WEBAPK_OPEN_MAX = 3; | 53 private static final int WEBAPK_OPEN_MAX = 3; |
50 public static final int WEBAPK_OPEN_LAUNCH_SUCCESS = 0; | 54 public static final int WEBAPK_OPEN_LAUNCH_SUCCESS = 0; |
51 public static final int WEBAPK_OPEN_NO_LAUNCH_INTENT = 1; | 55 public static final int WEBAPK_OPEN_NO_LAUNCH_INTENT = 1; |
52 public static final int WEBAPK_OPEN_ACTIVITY_NOT_FOUND = 2; | 56 public static final int WEBAPK_OPEN_ACTIVITY_NOT_FOUND = 2; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 } | 124 } |
121 | 125 |
122 /** Records the current Shell APK version. */ | 126 /** Records the current Shell APK version. */ |
123 public static void recordShellApkVersion(int shellApkVersion, String package
Name) { | 127 public static void recordShellApkVersion(int shellApkVersion, String package
Name) { |
124 String name = packageName.startsWith(WebApkConstants.WEBAPK_PACKAGE_PREF
IX) | 128 String name = packageName.startsWith(WebApkConstants.WEBAPK_PACKAGE_PREF
IX) |
125 ? "WebApk.ShellApkVersion.BrowserApk" | 129 ? "WebApk.ShellApkVersion.BrowserApk" |
126 : "WebApk.ShellApkVersion.UnboundApk"; | 130 : "WebApk.ShellApkVersion.UnboundApk"; |
127 RecordHistogram.recordSparseSlowlyHistogram(name, shellApkVersion); | 131 RecordHistogram.recordSparseSlowlyHistogram(name, shellApkVersion); |
128 } | 132 } |
129 } | 133 } |
OLD | NEW |