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

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

Issue 2576213005: 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // See enableHardwareAcceleration() 247 // See enableHardwareAcceleration()
248 private boolean mSetWindowHWA; 248 private boolean mSetWindowHWA;
249 249
250 // Chrome delegate that includes functionalities needed by Blimp client. 250 // Chrome delegate that includes functionalities needed by Blimp client.
251 private ChromeBlimpClientContextDelegate mBlimpClientContextDelegate; 251 private ChromeBlimpClientContextDelegate mBlimpClientContextDelegate;
252 252
253 // Skips capturing screenshot for testing purpose. 253 // Skips capturing screenshot for testing purpose.
254 private boolean mScreenshotCaptureSkippedForTesting; 254 private boolean mScreenshotCaptureSkippedForTesting;
255 255
256 /** 256 /**
257 * @param The {@link AppMenuHandlerFactory} for creating {@link mAppMenuHand ler} 257 * @param factory The {@link AppMenuHandlerFactory} for creating {@link mApp MenuHandler}
258 */ 258 */
259 @VisibleForTesting 259 @VisibleForTesting
260 public static void setAppMenuHandlerFactoryForTesting(AppMenuHandlerFactory factory) { 260 public static void setAppMenuHandlerFactoryForTesting(AppMenuHandlerFactory factory) {
261 sAppMenuHandlerFactory = factory; 261 sAppMenuHandlerFactory = factory;
262 } 262 }
263 263
264 @Override 264 @Override
265 public void preInflationStartup() { 265 public void preInflationStartup() {
266 super.preInflationStartup(); 266 super.preInflationStartup();
267 267
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 if (getActivityTab() == null) return null; 821 if (getActivityTab() == null) return null;
822 return getActivityTab().getUrl(); 822 return getActivityTab().getUrl();
823 } 823 }
824 }); 824 });
825 825
826 UpdateMenuItemHelper.getInstance().checkForUpdateOnBackgroundThr ead( 826 UpdateMenuItemHelper.getInstance().checkForUpdateOnBackgroundThr ead(
827 ChromeActivity.this); 827 ChromeActivity.this);
828 } 828 }
829 }); 829 });
830 830
831 final String simpleName = getClass().getSimpleName();
831 DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() { 832 DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() {
832 @Override 833 @Override
833 public void run() { 834 public void run() {
834 if (isActivityDestroyed()) return; 835 if (isActivityDestroyed()) return;
835 if (mToolbarManager != null) { 836 if (mToolbarManager != null) {
836 String simpleName = getClass().getSimpleName();
837 RecordHistogram.recordTimesHistogram( 837 RecordHistogram.recordTimesHistogram(
838 "MobileStartup.ToolbarInflationTime." + simpleName, 838 "MobileStartup.ToolbarInflationTime." + simpleName,
839 mInflateInitialLayoutDurationMs, TimeUnit.MILLISECON DS); 839 mInflateInitialLayoutDurationMs, TimeUnit.MILLISECON DS);
840 mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleName); 840 mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleName);
841 } 841 }
842 842
843 if (MultiWindowUtils.getInstance().isInMultiWindowMode(ChromeAct ivity.this)) { 843 if (MultiWindowUtils.getInstance().isInMultiWindowMode(ChromeAct ivity.this)) {
844 onDeferredStartupForMultiWindowMode(); 844 onDeferredStartupForMultiWindowMode();
845 } 845 }
846 } 846 }
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 "Android.MultiWindowMode.IsTabletScreenWidthBelow600", 1933 "Android.MultiWindowMode.IsTabletScreenWidthBelow600",
1934 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP); 1934 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP);
1935 1935
1936 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) { 1936 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) {
1937 RecordHistogram.recordLinearCountHistogram( 1937 RecordHistogram.recordLinearCountHistogram(
1938 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp, 1, 1938 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp, 1,
1939 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50); 1939 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50);
1940 } 1940 }
1941 } 1941 }
1942 } 1942 }
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