summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormariakhomenko <mariakhomenko@chromium.org>2015-07-07 18:44:48 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-08 01:45:34 +0000
commit201f8c710436d5bf4532a12e5828fd1e63da3af8 (patch)
tree49b8926966856b586f48ae588c488636cd8aa6e5
parent76b124147816bd7f8d02ef8f4caf29eb0fa29856 (diff)
downloadchromium_src-201f8c710436d5bf4532a12e5828fd1e63da3af8.zip
chromium_src-201f8c710436d5bf4532a12e5828fd1e63da3af8.tar.gz
chromium_src-201f8c710436d5bf4532a12e5828fd1e63da3af8.tar.bz2
Add logging to handleBackPressed().
This is to debug back issues in Chrome. BUG=507926 NOTRY=true NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1225983002 Cr-Commit-Position: refs/heads/master@{#337718}
-rw-r--r--chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
index 5b9b43f..9e5cb7f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -961,6 +961,7 @@ public class ChromeTabbedActivity extends ChromeActivity implements ActionBarDel
moveTaskToBack(true);
}
RecordUserAction.record("SystemBack");
+ Log.i(TAG, "handleBackPressed() - currentTab is null");
return true;
}
@@ -968,20 +969,24 @@ public class ChromeTabbedActivity extends ChromeActivity implements ActionBarDel
if (mLayoutManager.overviewVisible() && !isTablet()) {
mLayoutManager.hideOverview(true);
// TODO(benm): Record any user metrics in this case?
+ Log.i(TAG, "handleBackPressed() - hide overview");
return true;
}
if (isFullscreenVideoPlaying()) {
ContentVideoView.getContentVideoView().exitFullscreen(false);
+ Log.i(TAG, "handleBackPressed() - exit fullscreen video");
return true;
}
if (getFullscreenManager().getPersistentFullscreenMode()) {
getFullscreenManager().setPersistentFullscreenMode(false);
+ Log.i(TAG, "handleBackPressed() - exit fullscreen");
return true;
}
if (!getToolbarManager().back()) {
+ Log.i(TAG, "handleBackPressed() - no back stack");
final TabLaunchType type = currentTab.getLaunchType();
final String associatedApp = currentTab.getAppAssociatedWith();
final int parentId = currentTab.getParentId();
@@ -992,6 +997,7 @@ public class ChromeTabbedActivity extends ChromeActivity implements ActionBarDel
// actual redirected URL is a different system language based help url.
if (type == TabLaunchType.FROM_MENU_OR_OVERVIEW && helpUrl) {
getCurrentTabModel().closeTab(currentTab);
+ Log.i(TAG, "handleBackPressed() - help url");
return true;
}
@@ -1013,6 +1019,7 @@ public class ChromeTabbedActivity extends ChromeActivity implements ActionBarDel
&& !TextUtils.equals(associatedApp, getPackageName()));
if (minimizeApp) {
+ Log.i(TAG, "handleBackPressed() - moveTaskToBack");
moveTaskToBack(true);
if (shouldCloseTab) {
// In the case of closing a tab upon minimalization, don't allow the close
@@ -1029,6 +1036,7 @@ public class ChromeTabbedActivity extends ChromeActivity implements ActionBarDel
getCurrentTabModel().closeTab(currentTab, true, false, false);
}
} else {
+ Log.i(TAG, "handleBackPressed() - moving back in navigation");
RecordUserAction.record("SystemBackForNavigation");
RecordUserAction.record("MobileTabClobbered");
}