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

Unified Diff: chrome/browser/banners/app_banner_manager.cc

Issue 2671653002: Webapps: Clear AppBannerManagerAndroid::native_app_data_ prior to native app check (Closed)
Patch Set: Merge branch 'master' into install_banner Created 3 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 | « chrome/browser/banners/app_banner_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/banners/app_banner_manager.cc
diff --git a/chrome/browser/banners/app_banner_manager.cc b/chrome/browser/banners/app_banner_manager.cc
index 5344e0da7c102e943527fdc861327d25458944c6..98e0964741bbce168defece1ac6ead560c5f579d 100644
--- a/chrome/browser/banners/app_banner_manager.cc
+++ b/chrome/browser/banners/app_banner_manager.cc
@@ -304,6 +304,14 @@ void AppBannerManager::ReportStatus(content::WebContents* web_contents,
}
}
+void AppBannerManager::ResetCurrentPageData() {
+ active_media_players_.clear();
+ manifest_ = content::Manifest();
+ manifest_url_ = GURL();
+ validated_url_ = GURL();
+ referrer_.erase();
+}
+
void AppBannerManager::Stop() {
if (was_canceled_by_page_ && !page_requested_prompt_) {
TrackBeforeInstallEvent(
@@ -327,8 +335,6 @@ void AppBannerManager::Stop() {
was_canceled_by_page_ = false;
page_requested_prompt_ = false;
need_to_log_status_ = false;
- validated_url_ = GURL();
- referrer_.erase();
}
void AppBannerManager::SendBannerPromptRequest() {
@@ -363,7 +369,7 @@ void AppBannerManager::DidStartNavigation(content::NavigationHandle* handle) {
void AppBannerManager::DidFinishNavigation(content::NavigationHandle* handle) {
if (handle->IsInMainFrame() && handle->HasCommitted() &&
!handle->IsSamePage()) {
- active_media_players_.clear();
+ ResetCurrentPageData();
if (is_active_)
Stop();
}
« no previous file with comments | « chrome/browser/banners/app_banner_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698