Chromium Code Reviews| 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..b11a9ec5a1056e1ead3c22dfb646965234e14e01 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 |
|
Theresa
2016/12/01 19:54:05
nit: add a period to the end of this sentence
JJ
2016/12/01 22:39:40
Done.
|
| + */ |
| + 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. |
| */ |