| 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.
|
| */
|
|
|