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

Side by Side Diff: chrome/browser/android/banners/app_banner_data_fetcher_android.cc

Issue 1749603002: Store URLs in WebappDataStorage, and purge them when history is cleared. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/banners/app_banner_data_fetcher_android.h" 5 #include "chrome/browser/android/banners/app_banner_data_fetcher_android.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/android/banners/app_banner_infobar_delegate_android.h" 9 #include "chrome/browser/android/banners/app_banner_infobar_delegate_android.h"
10 #include "chrome/browser/android/shortcut_helper.h" 10 #include "chrome/browser/android/shortcut_helper.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 GURL image_url = ManifestIconSelector::FindBestMatchingIcon( 65 GURL image_url = ManifestIconSelector::FindBestMatchingIcon(
66 web_app_data().icons, ideal_splash_image_size_in_dp_, 66 web_app_data().icons, ideal_splash_image_size_in_dp_,
67 minimum_splash_image_size_in_dp_); 67 minimum_splash_image_size_in_dp_);
68 68
69 ShortcutHelper::FetchSplashScreenImage( 69 ShortcutHelper::FetchSplashScreenImage(
70 web_contents, 70 web_contents,
71 image_url, 71 image_url,
72 ideal_splash_image_size_in_dp_, 72 ideal_splash_image_size_in_dp_,
73 minimum_splash_image_size_in_dp_, 73 minimum_splash_image_size_in_dp_,
74 webapp_id); 74 webapp_id,
75 web_app_data().start_url.spec());
75 } 76 }
76 77
77 void AppBannerDataFetcherAndroid::ShowBanner(const SkBitmap* icon, 78 void AppBannerDataFetcherAndroid::ShowBanner(const SkBitmap* icon,
78 const base::string16& title, 79 const base::string16& title,
79 const std::string& referrer) { 80 const std::string& referrer) {
80 content::WebContents* web_contents = GetWebContents(); 81 content::WebContents* web_contents = GetWebContents();
81 DCHECK(web_contents); 82 DCHECK(web_contents);
82 83
83 infobars::InfoBar* infobar = nullptr; 84 infobars::InfoBar* infobar = nullptr;
84 if (native_app_data_.is_null()) { 85 if (native_app_data_.is_null()) {
(...skipping 18 matching lines...) Expand all
103 if (infobar) { 104 if (infobar) {
104 RecordDidShowBanner("AppBanner.NativeApp.Shown"); 105 RecordDidShowBanner("AppBanner.NativeApp.Shown");
105 TrackDisplayEvent(DISPLAY_EVENT_NATIVE_APP_BANNER_CREATED); 106 TrackDisplayEvent(DISPLAY_EVENT_NATIVE_APP_BANNER_CREATED);
106 } 107 }
107 } 108 }
108 InfoBarService::FromWebContents(web_contents) 109 InfoBarService::FromWebContents(web_contents)
109 ->AddInfoBar(make_scoped_ptr(infobar)); 110 ->AddInfoBar(make_scoped_ptr(infobar));
110 } 111 }
111 112
112 } // namespace banners 113 } // namespace banners
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698