Commit f94da5ac authored by Peter Kotwicz's avatar Peter Kotwicz Committed by Commit Bot

Delete unused methods in AppBannerUiDelegateAndroid

This CL deletes
AppBannerUiDelegateAndroid::OnNativeAppInstallStarted()
AppBannerUiDelegateAndroid::OnNativeAppInstallFinished()
which are unused as a result of http://crrev.com/c/1338337

BUG=1013004

Change-Id: I8d53baa1c8b8d324b18d89e5f0f84cc5c1c87f98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1847673
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704468}
parent 6c512635
...@@ -32,8 +32,8 @@ enum DisplayEvent { ...@@ -32,8 +32,8 @@ enum DisplayEvent {
enum InstallEvent { enum InstallEvent {
INSTALL_EVENT_MIN = 20, INSTALL_EVENT_MIN = 20,
INSTALL_EVENT_NATIVE_APP_INSTALL_TRIGGERED = 21, INSTALL_EVENT_NATIVE_APP_INSTALL_TRIGGERED = 21,
INSTALL_EVENT_NATIVE_APP_INSTALL_STARTED = 22, // Deprecated: INSTALL_EVENT_NATIVE_APP_INSTALL_STARTED = 22,
INSTALL_EVENT_NATIVE_APP_INSTALL_COMPLETED = 23, // Deprecated: INSTALL_EVENT_NATIVE_APP_INSTALL_COMPLETED = 23,
INSTALL_EVENT_WEB_APP_INSTALLED = 24, INSTALL_EVENT_WEB_APP_INSTALLED = 24,
INSTALL_EVENT_MAX = 25, INSTALL_EVENT_MAX = 25,
}; };
...@@ -46,7 +46,7 @@ enum DismissEvent { ...@@ -46,7 +46,7 @@ enum DismissEvent {
DISMISS_EVENT_BANNER_CLICK = 43, DISMISS_EVENT_BANNER_CLICK = 43,
DISMISS_EVENT_BANNER_SWIPE = 44, DISMISS_EVENT_BANNER_SWIPE = 44,
DISMISS_EVENT_CLOSE_BUTTON = 45, DISMISS_EVENT_CLOSE_BUTTON = 45,
DISMISS_EVENT_INSTALL_TIMEOUT = 46, // Deprecated: DISMISS_EVENT_INSTALL_TIMEOUT = 46,
DISMISS_EVENT_DISMISSED = 47, DISMISS_EVENT_DISMISSED = 47,
DISMISS_EVENT_AMBIENT_INFOBAR_DISMISSED = 48, DISMISS_EVENT_AMBIENT_INFOBAR_DISMISSED = 48,
DISMISS_EVENT_MAX = 49, DISMISS_EVENT_MAX = 49,
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
#include "chrome/browser/banners/app_banner_metrics.h" #include "chrome/browser/banners/app_banner_metrics.h"
#include "chrome/browser/banners/app_banner_settings_helper.h" #include "chrome/browser/banners/app_banner_settings_helper.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "components/rappor/public/rappor_utils.h"
#include "components/rappor/rappor_service_impl.h"
#include "components/url_formatter/elide_url.h" #include "components/url_formatter/elide_url.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "ui/gfx/android/java_bitmap.h" #include "ui/gfx/android/java_bitmap.h"
...@@ -133,26 +131,6 @@ bool AppBannerUiDelegateAndroid::InstallApp( ...@@ -133,26 +131,6 @@ bool AppBannerUiDelegateAndroid::InstallApp(
return should_close_banner; return should_close_banner;
} }
void AppBannerUiDelegateAndroid::OnNativeAppInstallStarted(
content::WebContents* web_contents) {
AppBannerSettingsHelper::RecordBannerEvent(
web_contents, web_contents->GetVisibleURL(), package_name_,
AppBannerSettingsHelper::APP_BANNER_EVENT_DID_ADD_TO_HOMESCREEN,
AppBannerManager::GetCurrentTime());
TrackInstallEvent(INSTALL_EVENT_NATIVE_APP_INSTALL_STARTED);
rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(),
"AppBanner.NativeApp.Installed",
web_contents->GetURL());
}
void AppBannerUiDelegateAndroid::OnNativeAppInstallFinished(bool success) {
if (success)
TrackInstallEvent(INSTALL_EVENT_NATIVE_APP_INSTALL_COMPLETED);
else
TrackDismissEvent(DISMISS_EVENT_INSTALL_TIMEOUT);
}
void AppBannerUiDelegateAndroid::OnUiCancelled( void AppBannerUiDelegateAndroid::OnUiCancelled(
JNIEnv* env, JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj) { const base::android::JavaParamRef<jobject>& obj) {
......
...@@ -74,14 +74,6 @@ class AppBannerUiDelegateAndroid { ...@@ -74,14 +74,6 @@ class AppBannerUiDelegateAndroid {
// the installation UI should be dismissed. // the installation UI should be dismissed.
bool InstallApp(content::WebContents* web_contents); bool InstallApp(content::WebContents* web_contents);
// Called by the UI layer to indicate that a native app has begun
// installation.
void OnNativeAppInstallStarted(content::WebContents* web_contents);
// Called by the UI layer to indicate that a native app has finished
// installation.
void OnNativeAppInstallFinished(bool success);
// Called through the JNI to indicate that the user has dismissed the // Called through the JNI to indicate that the user has dismissed the
// installation UI. // installation UI.
void OnUiCancelled(JNIEnv* env, void OnUiCancelled(JNIEnv* env,
......
...@@ -1893,7 +1893,9 @@ Unknown properties are collapsed to zero. --> ...@@ -1893,7 +1893,9 @@ Unknown properties are collapsed to zero. -->
<int value="43" label="User clicked on the banner"/> <int value="43" label="User clicked on the banner"/>
<int value="44" label="(Obsolete) User swiped the banner away"/> <int value="44" label="(Obsolete) User swiped the banner away"/>
<int value="45" label="User hit the X button"/> <int value="45" label="User hit the X button"/>
<int value="46" label="User began app install, but it didn't finish in time"/> <int value="46"
label="User began app install, but it didn't finish in time
(deprecated)"/>
<int value="47" label="Banner was dismissed for any reason"/> <int value="47" label="Banner was dismissed for any reason"/>
<int value="48" label="Ambient badge infobar was dismissed"/> <int value="48" label="Ambient badge infobar was dismissed"/>
</enum> </enum>
...@@ -1956,9 +1958,11 @@ Unknown properties are collapsed to zero. --> ...@@ -1956,9 +1958,11 @@ Unknown properties are collapsed to zero. -->
<enum name="AppBannersInstallEvent"> <enum name="AppBannersInstallEvent">
<int value="21" label="(Native app) User triggered the app install dialog"/> <int value="21" label="(Native app) User triggered the app install dialog"/>
<int value="22" label="(Native app) User began installing the app"/> <int value="22"
label="(Native app) User began installing the app (deprecated)"/>
<int value="23" <int value="23"
label="(Native app) User waited for the app to finish installing"/> label="(Native app) User waited for the app to finish installing
(deprecated)"/>
<int value="24" label="(Web app) User installed a web app"/> <int value="24" label="(Web app) User installed a web app"/>
</enum> </enum>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment