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

Unified Diff: chrome/browser/android/banners/app_banner_infobar_delegate.cc

Issue 939263002: [App banners] Add RAPPOR support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Swapped out for new call Created 5 years, 10 months 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/browser/android/banners/app_banner_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/banners/app_banner_infobar_delegate.cc
diff --git a/chrome/browser/android/banners/app_banner_infobar_delegate.cc b/chrome/browser/android/banners/app_banner_infobar_delegate.cc
index 789fecf17119b6fed599a0a5f29e0e47401b5a0f..625a12f9406468794686cbccfed5080110b8db7c 100644
--- a/chrome/browser/android/banners/app_banner_infobar_delegate.cc
+++ b/chrome/browser/android/banners/app_banner_infobar_delegate.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/banners/app_banner_metrics.h"
#include "chrome/browser/banners/app_banner_settings_helper.h"
#include "chrome/browser/infobars/infobar_service.h"
+#include "chrome/browser/metrics/rappor/sampling.h"
#include "chrome/browser/ui/android/infobars/app_banner_infobar.h"
#include "chrome/grit/generated_resources.h"
#include "components/infobars/core/infobar.h"
@@ -121,12 +122,18 @@ void AppBannerInfoBarDelegate::InfoBarDismissed() {
native_app_package_,
AppBannerSettingsHelper::APP_BANNER_EVENT_DID_BLOCK,
AppBannerManager::GetCurrentTime());
+
+ rappor::SampleDomainAndRegistryFromGURL("AppBanner.NativeApp.Dismissed",
+ web_contents->GetURL());
} else if (!web_app_data_.IsEmpty()) {
AppBannerSettingsHelper::RecordBannerEvent(
web_contents, web_contents->GetURL(),
web_app_data_.start_url.spec(),
AppBannerSettingsHelper::APP_BANNER_EVENT_DID_BLOCK,
AppBannerManager::GetCurrentTime());
+
+ rappor::SampleDomainAndRegistryFromGURL("AppBanner.WebApp.Dismissed",
+ web_contents->GetURL());
}
}
@@ -176,6 +183,8 @@ bool AppBannerInfoBarDelegate::Accept() {
true);
TrackInstallEvent(INSTALL_EVENT_WEB_APP_INSTALLED);
+ rappor::SampleDomainAndRegistryFromGURL("AppBanner.WebApp.Installed",
+ web_contents->GetURL());
return true;
}
@@ -228,6 +237,8 @@ void AppBannerInfoBarDelegate::OnInstallIntentReturned(
AppBannerManager::GetCurrentTime());
TrackInstallEvent(INSTALL_EVENT_NATIVE_APP_INSTALL_STARTED);
+ rappor::SampleDomainAndRegistryFromGURL("AppBanner.NativeApp.Installed",
+ web_contents->GetURL());
}
UpdateInstallState(env, obj);
« no previous file with comments | « no previous file | chrome/browser/android/banners/app_banner_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698