Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java |
| index 3eab85dd886007b5d92e66de7ebbc18443157588..892870c296b4ff5ea8ff6fb3871428a7fa58bb62 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java |
| @@ -21,7 +21,10 @@ import org.chromium.chrome.browser.crash.CrashFileManager; |
| import org.chromium.chrome.browser.crash.MinidumpUploadService; |
| import org.chromium.chrome.browser.media.MediaCaptureNotificationService; |
| import org.chromium.chrome.browser.metrics.UmaUtils; |
| +import org.chromium.chrome.browser.ntp.NewTabPage; |
| import org.chromium.chrome.browser.partnerbookmarks.PartnerBookmarksShim; |
| +import org.chromium.chrome.browser.partnercustomizations.HomepageManager; |
| +import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations; |
| import org.chromium.chrome.browser.physicalweb.PhysicalWeb; |
| import org.chromium.chrome.browser.precache.PrecacheLauncher; |
| import org.chromium.chrome.browser.preferences.ChromePreferenceManager; |
| @@ -106,6 +109,29 @@ public class DeferredStartupHandler { |
| AfterStartupTaskUtils.setStartupComplete(); |
| + // Log details about the current state of the homepage. On other platforms, this |
| + // information is stored as part of Chrome preferences. But on Android, an external |
| + // provider must be contacted before we can fully resolve this. Also, we do not store |
|
Mark P
2016/05/24 04:31:26
please rewrite this sentence without "we"--it's un
Ted C
2016/05/24 16:53:15
removed this comment entirely as it is documented
|
| + // this information as part of Chrome preferences because we never want this to be synced |
| + // across devices. See PrefMetricsService::RecordLaunchPrefs for the inspiration for these |
| + // metrics. |
| + PartnerBrowserCustomizations.setOnInitializeAsyncFinished(new Runnable() { |
|
Mark P
2016/05/24 04:31:26
Will this be logged on startup (well technically p
Ted C
2016/05/24 16:53:15
It will be logged once on startup. No multi-profi
|
| + @Override |
| + public void run() { |
| + boolean isHomepageEnabled = |
| + HomepageManager.isHomepageEnabled(application); |
| + RecordHistogram.recordBooleanHistogram( |
| + "Settings.ShowHomeButton", isHomepageEnabled); |
|
Mark P
2016/05/24 04:31:26
Does show home button really mean the same thing a
Ted C
2016/05/24 16:53:15
Nah, isHomepageEnabled is what we use for button s
|
| + |
| + if (!isHomepageEnabled) return; |
| + |
| + String homepageUrl = HomepageManager.getHomepageUri(application); |
| + RecordHistogram.recordBooleanHistogram( |
| + "Settings.GivenShowHomeButton_HomePageIsNewTabPage", |
| + NewTabPage.isNTPUrl(homepageUrl)); |
| + } |
| + }); |
| + |
| // TODO(aruslan): http://b/6397072 This will be moved elsewhere |
| PartnerBookmarksShim.kickOffReading(application); |