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

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

Issue 2576283003: Android: Fix wrong UMA histogram name (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.app.SearchManager; 10 import android.app.SearchManager;
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // See enableHardwareAcceleration() 250 // See enableHardwareAcceleration()
251 private boolean mSetWindowHWA; 251 private boolean mSetWindowHWA;
252 252
253 // Chrome delegate that includes functionalities needed by Blimp client. 253 // Chrome delegate that includes functionalities needed by Blimp client.
254 private ChromeBlimpClientContextDelegate mBlimpClientContextDelegate; 254 private ChromeBlimpClientContextDelegate mBlimpClientContextDelegate;
255 255
256 // Skips capturing screenshot for testing purpose. 256 // Skips capturing screenshot for testing purpose.
257 private boolean mScreenshotCaptureSkippedForTesting; 257 private boolean mScreenshotCaptureSkippedForTesting;
258 258
259 /** 259 /**
260 * @param The {@link AppMenuHandlerFactory} for creating {@link mAppMenuHand ler} 260 * @param factory The {@link AppMenuHandlerFactory} for creating {@link mApp MenuHandler}
261 */ 261 */
262 @VisibleForTesting 262 @VisibleForTesting
263 public static void setAppMenuHandlerFactoryForTesting(AppMenuHandlerFactory factory) { 263 public static void setAppMenuHandlerFactoryForTesting(AppMenuHandlerFactory factory) {
264 sAppMenuHandlerFactory = factory; 264 sAppMenuHandlerFactory = factory;
265 } 265 }
266 266
267 @Override 267 @Override
268 public void preInflationStartup() { 268 public void preInflationStartup() {
269 super.preInflationStartup(); 269 super.preInflationStartup();
270 270
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 if (getActivityTab() == null) return null; 824 if (getActivityTab() == null) return null;
825 return getActivityTab().getUrl(); 825 return getActivityTab().getUrl();
826 } 826 }
827 }); 827 });
828 828
829 UpdateMenuItemHelper.getInstance().checkForUpdateOnBackgroundThr ead( 829 UpdateMenuItemHelper.getInstance().checkForUpdateOnBackgroundThr ead(
830 ChromeActivity.this); 830 ChromeActivity.this);
831 } 831 }
832 }); 832 });
833 833
834 final String simpleName = getClass().getSimpleName();
834 DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() { 835 DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() {
835 @Override 836 @Override
836 public void run() { 837 public void run() {
837 if (isActivityDestroyed()) return; 838 if (isActivityDestroyed()) return;
838 if (mToolbarManager != null) { 839 if (mToolbarManager != null) {
839 String simpleName = getClass().getSimpleName();
840 RecordHistogram.recordTimesHistogram( 840 RecordHistogram.recordTimesHistogram(
841 "MobileStartup.ToolbarInflationTime." + simpleName, 841 "MobileStartup.ToolbarInflationTime." + simpleName,
842 mInflateInitialLayoutDurationMs, TimeUnit.MILLISECON DS); 842 mInflateInitialLayoutDurationMs, TimeUnit.MILLISECON DS);
843 mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleName); 843 mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleName);
844 } 844 }
845 845
846 if (MultiWindowUtils.getInstance().isInMultiWindowMode(ChromeAct ivity.this)) { 846 if (MultiWindowUtils.getInstance().isInMultiWindowMode(ChromeAct ivity.this)) {
847 onDeferredStartupForMultiWindowMode(); 847 onDeferredStartupForMultiWindowMode();
848 } 848 }
849 } 849 }
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1940 "Android.MultiWindowMode.IsTabletScreenWidthBelow600", 1940 "Android.MultiWindowMode.IsTabletScreenWidthBelow600",
1941 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP); 1941 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP);
1942 1942
1943 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) { 1943 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) {
1944 RecordHistogram.recordLinearCountHistogram( 1944 RecordHistogram.recordLinearCountHistogram(
1945 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp, 1, 1945 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp, 1,
1946 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50); 1946 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50);
1947 } 1947 }
1948 } 1948 }
1949 } 1949 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698