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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java

Issue 1814213004: Record UMA for Physical Web state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Included utils.java in gn build Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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; 5 package org.chromium.chrome.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.AsyncTask; 8 import android.os.AsyncTask;
9 import android.text.TextUtils; 9 import android.text.TextUtils;
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 String customTabsTrialGroupName = FieldTrialList.findFullName("CustomTab s"); 113 String customTabsTrialGroupName = FieldTrialList.findFullName("CustomTab s");
114 if (customTabsTrialGroupName.equals("Disabled")) { 114 if (customTabsTrialGroupName.equals("Disabled")) {
115 ChromePreferenceManager.getInstance(application).setCustomTabsEnable d(false); 115 ChromePreferenceManager.getInstance(application).setCustomTabsEnable d(false);
116 } else if (customTabsTrialGroupName.equals("Enabled") 116 } else if (customTabsTrialGroupName.equals("Enabled")
117 || customTabsTrialGroupName.equals("DisablePrerender")) { 117 || customTabsTrialGroupName.equals("DisablePrerender")) {
118 ChromePreferenceManager.getInstance(application).setCustomTabsEnable d(true); 118 ChromePreferenceManager.getInstance(application).setCustomTabsEnable d(true);
119 } 119 }
120 120
121 // Start or stop Physical Web 121 // Start or stop Physical Web
122 if (PhysicalWeb.shouldStartOnLaunch(application)) { 122 PhysicalWeb.onChromeStart(application);
123 PhysicalWeb.startPhysicalWeb(application);
124 PhysicalWeb.uploadDeferredMetrics(application);
125 } else {
126 PhysicalWeb.stopPhysicalWeb(application);
127 }
128 123
129 mDeferredStartupComplete = true; 124 mDeferredStartupComplete = true;
130 } 125 }
131 126
132 private static float parseFloat(String value, float defaultValue) { 127 private static float parseFloat(String value, float defaultValue) {
133 try { 128 try {
134 return TextUtils.isEmpty(value) ? defaultValue : Float.parseFloat(va lue); 129 return TextUtils.isEmpty(value) ? defaultValue : Float.parseFloat(va lue);
135 } catch (NumberFormatException e) { 130 } catch (NumberFormatException e) {
136 return defaultValue; 131 return defaultValue;
137 } 132 }
(...skipping 11 matching lines...) Expand all
149 } 144 }
150 145
151 /** 146 /**
152 * @return Whether deferred startup has been completed. 147 * @return Whether deferred startup has been completed.
153 */ 148 */
154 @VisibleForTesting 149 @VisibleForTesting
155 public boolean isDeferredStartupComplete() { 150 public boolean isDeferredStartupComplete() {
156 return mDeferredStartupComplete; 151 return mDeferredStartupComplete;
157 } 152 }
158 } 153 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698