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

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

Issue 2534333002: Show 'Send Feedback' button on the sad tab page on multiple failures (Closed)
Patch Set: Fixed code based off of twellington's comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/tab/SadTabViewFactory.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
index f1f4805fc356e796e96ed8463edd0b8b79048674..c7223de735e4d6fc44d15b1df8ee86fc3a27dfef 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -1720,13 +1720,7 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
builder.show();
}
} else if (id == R.id.help_id) {
- // Since reading back the compositor is asynchronous, we need to do the readback
- // before starting the GoogleHelp.
- String helpContextId = HelpAndFeedback.getHelpContextIdFromUrl(
- this, currentTab.getUrl(), getCurrentTabModel().isIncognito());
- HelpAndFeedback.getInstance(this)
- .show(this, helpContextId, currentTab.getProfile(), currentTab.getUrl());
- RecordUserAction.record("MobileMenuFeedback");
+ startHelpAndFeedback(currentTab, "MobileMenuFeedback");
} else {
return false;
}
@@ -1734,6 +1728,21 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
}
/**
+ * Shows HelpAndFeedback and records the user action as well.
+ * @param currentTab The tab that the user is currently on.
+ * @param recordAction The user action to record.
+ */
+ public void startHelpAndFeedback(Tab currentTab, String recordAction) {
+ // Since reading back the compositor is asynchronous, we need to do the readback
+ // before starting the GoogleHelp.
+ String helpContextId = HelpAndFeedback.getHelpContextIdFromUrl(
+ this, currentTab.getUrl(), getCurrentTabModel().isIncognito());
+ HelpAndFeedback.getInstance(this)
+ .show(this, helpContextId, currentTab.getProfile(), currentTab.getUrl());
+ RecordUserAction.record(recordAction);
+ }
+
+ /**
* Tests if VR Shell (the mode displaying browser UI and tab contents in VR) is currently
* enabled.
*/
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/tab/SadTabViewFactory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698