Index: chrome/browser/banners/app_banner_data_fetcher.cc |
diff --git a/chrome/browser/banners/app_banner_data_fetcher.cc b/chrome/browser/banners/app_banner_data_fetcher.cc |
index 8f973ce45678d382aa8013f8ff63d597bc113674..8507486b7dd56f534c17137f751a747bcba7bf5d 100644 |
--- a/chrome/browser/banners/app_banner_data_fetcher.cc |
+++ b/chrome/browser/banners/app_banner_data_fetcher.cc |
@@ -12,11 +12,9 @@ |
#include "chrome/browser/banners/app_banner_settings_helper.h" |
#include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h" |
#include "chrome/browser/browser_process.h" |
-#include "chrome/browser/infobars/infobar_service.h" |
#include "chrome/browser/manifest/manifest_icon_selector.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/render_messages.h" |
-#include "components/infobars/core/infobar.h" |
#include "components/rappor/rappor_utils.h" |
#include "content/public/browser/browser_context.h" |
#include "content/public/browser/browser_thread.h" |
@@ -158,11 +156,7 @@ void AppBannerDataFetcher::OnBannerPromptReply( |
FOR_EACH_OBSERVER(Observer, observer_list_, |
OnDecidedWhetherToShow(this, true)); |
- infobars::InfoBar* infobar = CreateBanner(app_icon_.get(), app_title_); |
- if (infobar) { |
- InfoBarService::FromWebContents(web_contents)->AddInfoBar( |
- make_scoped_ptr(infobar)); |
- } |
+ ShowBanner(app_icon_.get(), app_title_); |
is_active_ = false; |
} |
@@ -205,18 +199,6 @@ bool AppBannerDataFetcher::FetchIcon(const GURL& image_url) { |
return true; |
} |
-infobars::InfoBar* AppBannerDataFetcher::CreateBanner( |
- const SkBitmap* icon, |
- const base::string16& title) { |
- content::WebContents* web_contents = GetWebContents(); |
- DCHECK(web_contents && !web_app_data_.IsEmpty()); |
- |
- // TODO(dfalcantara): Desktop doesn't display app banners, yet. Just pretend |
- // that a banner was shown for testing purposes. |
- RecordDidShowBanner("AppBanner.WebApp.Shown"); |
- return nullptr; |
-} |
- |
void AppBannerDataFetcher::RecordDidShowBanner(const std::string& event_name) { |
content::WebContents* web_contents = GetWebContents(); |
DCHECK(web_contents); |
@@ -310,12 +292,12 @@ void AppBannerDataFetcher::OnDidCheckHasServiceWorker( |
void AppBannerDataFetcher::OnFetchComplete(const GURL& url, |
const SkBitmap* icon) { |
if (is_active_) |
- ShowBanner(icon); |
+ RequestShowBanner(icon); |
Release(); |
} |
-void AppBannerDataFetcher::ShowBanner(const SkBitmap* icon) { |
+void AppBannerDataFetcher::RequestShowBanner(const SkBitmap* icon) { |
content::WebContents* web_contents = GetWebContents(); |
if (!CheckFetcherIsStillAlive(web_contents)) { |
Cancel(); |