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

Issue 2156113002: Replace AppBannerDataFetcher with InstallableManager. (Closed)

Created:
4 years, 5 months ago by dominickn
Modified:
4 years, 4 months ago
Reviewers:
Lei Zhang, benwells, gone
CC:
chromium-reviews, dominickn+watch_chromium.org, Matt Giuca, Xi Han, mlamouri (slow - plz ping), pkotwicz
Base URL:
https://chromium.googlesource.com/chromium/src.git@banner-refactor
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace AppBannerDataFetcher with InstallableManager. https://crrev.com/2160513002 introduces the InstallableManager, which is a generic, caching, WebContents-scoped version of AppBannerDataFetcher. This CL replaces AppBannerDataFetcher, AppBannerDataFetcherDesktop and AppBannerDataFetcherAndroid with calls to InstallableManager. Banner-specific functionality (e.g. sending IPCs to trigger JS events in the renderer, receiving renderer responses, etc.) has been moved to AppBannerManager, and platform- specific code now lives in AppBannerManagerDesktop and AppBannerManagerAndroid. This consolidates and simplifies app banners, making it more testable and cleaner. All app banner data fetcher code and tests are deleted in this CL. Additionally, the app banner emulation class is no longer needed to emulate mobile banners on desktop. Instead, the AppBannerManagerDesktop class can be used directly. The app banner logging code has been migrated to the installable component, allowing other systems to make use of it. The data fetcher tests have been migrated to run with the AppBannerManager. Future CLs will introduce further tests and new metrics with the InstallableErrorCode enum that is now used to signal error states. BUG=628921 TBR=thestig@chromium.org Committed: https://crrev.com/d223e62e9459d219141c09ac6b10f983c841fa45 Cr-Commit-Position: refs/heads/master@{#410959}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Rebase #

Patch Set 4 : Rebase #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase #

Total comments: 16

Patch Set 7 : Addressing reviewer comments #

Patch Set 8 : Rebase #

Patch Set 9 : Rebase #

Patch Set 10 : Rebase #

Patch Set 11 : Rebase #

Patch Set 12 : Rebase #

Total comments: 8

Patch Set 13 : Address comments #

Patch Set 14 : Address comments #

Total comments: 5

Patch Set 15 : Naming, includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1107 lines, -2262 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/banners/AppBannerManager.java View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java View 5 chunks +5 lines, -5 lines 0 comments Download
D chrome/browser/android/banners/app_banner_data_fetcher_android.h View 1 chunk +0 lines, -65 lines 0 comments Download
D chrome/browser/android/banners/app_banner_data_fetcher_android.cc View 1 chunk +0 lines, -121 lines 0 comments Download
M chrome/browser/android/banners/app_banner_infobar_delegate_android.h View 3 chunks +18 lines, -16 lines 0 comments Download
M chrome/browser/android/banners/app_banner_infobar_delegate_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +32 lines, -30 lines 0 comments Download
M chrome/browser/android/banners/app_banner_manager_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +55 lines, -23 lines 0 comments Download
M chrome/browser/android/banners/app_banner_manager_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +147 lines, -61 lines 0 comments Download
D chrome/browser/banners/app_banner_data_fetcher.h View 1 chunk +0 lines, -218 lines 0 comments Download
D chrome/browser/banners/app_banner_data_fetcher.cc View 1 chunk +0 lines, -496 lines 0 comments Download
D chrome/browser/banners/app_banner_data_fetcher_browsertest.cc View 1 chunk +0 lines, -349 lines 0 comments Download
D chrome/browser/banners/app_banner_data_fetcher_desktop.h View 1 chunk +0 lines, -53 lines 0 comments Download
D chrome/browser/banners/app_banner_data_fetcher_desktop.cc View 1 chunk +0 lines, -100 lines 0 comments Download
D chrome/browser/banners/app_banner_data_fetcher_unittest.cc View 1 chunk +0 lines, -148 lines 0 comments Download
D chrome/browser/banners/app_banner_debug_log.h View 1 chunk +0 lines, -53 lines 0 comments Download
D chrome/browser/banners/app_banner_debug_log.cc View 1 chunk +0 lines, -135 lines 0 comments Download
M chrome/browser/banners/app_banner_infobar_delegate_desktop.h View 3 chunks +11 lines, -12 lines 0 comments Download
M chrome/browser/banners/app_banner_infobar_delegate_desktop.cc View 5 chunks +15 lines, -16 lines 0 comments Download
M chrome/browser/banners/app_banner_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +200 lines, -42 lines 0 comments Download
M chrome/browser/banners/app_banner_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +350 lines, -49 lines 0 comments Download
A + chrome/browser/banners/app_banner_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 5 chunks +148 lines, -144 lines 0 comments Download
M chrome/browser/banners/app_banner_manager_desktop.h View 1 chunk +27 lines, -7 lines 0 comments Download
M chrome/browser/banners/app_banner_manager_desktop.cc View 1 2 3 4 5 6 7 8 9 2 chunks +88 lines, -16 lines 0 comments Download
D chrome/browser/banners/app_banner_manager_emulation.h View 1 chunk +0 lines, -33 lines 0 comments Download
D chrome/browser/banners/app_banner_manager_emulation.cc View 1 chunk +0 lines, -47 lines 0 comments Download
M chrome/browser/banners/app_banner_settings_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +0 lines, -10 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 66 (48 generated)
dominickn
PTAL, thanks! (and sorry again). This is the second of two CLs which implement the ...
4 years, 5 months ago (2016-07-18 12:45:57 UTC) #7
dominickn
On 2016/07/18 12:45:57, dominickn wrote: > PTAL, thanks! (and sorry again). > > This is ...
4 years, 5 months ago (2016-07-19 09:07:19 UTC) #16
gone
Didn't go over the desktop stuff. Is this going to have to be rebased on ...
4 years, 5 months ago (2016-07-23 23:39:23 UTC) #30
dominickn
Thanks! This CL will be rebased onto the final version of the InstallableChecker CL. https://codereview.chromium.org/2156113002/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/banners/AppBannerManager.java ...
4 years, 5 months ago (2016-07-25 00:23:51 UTC) #31
dominickn
benwells: PTAL, thanks!
4 years, 4 months ago (2016-08-03 06:40:26 UTC) #38
gone
https://chromiumcodereview.appspot.com/2156113002/diff/220001/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc File chrome/browser/android/banners/app_banner_infobar_delegate_android.cc (right): https://chromiumcodereview.appspot.com/2156113002/diff/220001/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc#newcode266 chrome/browser/android/banners/app_banner_infobar_delegate_android.cc:266: weak_manager_->FetchWebappSplashScreenImageCallback(uid))); Don't you need to check if the weak ...
4 years, 4 months ago (2016-08-03 19:33:08 UTC) #43
dominickn
https://codereview.chromium.org/2156113002/diff/220001/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc File chrome/browser/android/banners/app_banner_infobar_delegate_android.cc (right): https://codereview.chromium.org/2156113002/diff/220001/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc#newcode266 chrome/browser/android/banners/app_banner_infobar_delegate_android.cc:266: weak_manager_->FetchWebappSplashScreenImageCallback(uid))); On 2016/08/03 19:33:08, dfalcantara wrote: > Don't you ...
4 years, 4 months ago (2016-08-04 02:51:07 UTC) #45
gone
Android stuff seems fine. lgtm.
4 years, 4 months ago (2016-08-04 17:09:18 UTC) #46
pkotwicz
benwells@: Ping!
4 years, 4 months ago (2016-08-08 01:11:46 UTC) #47
benwells
lgtm with nits / comments https://codereview.chromium.org/2156113002/diff/260001/chrome/browser/banners/app_banner_manager.cc File chrome/browser/banners/app_banner_manager.cc (right): https://codereview.chromium.org/2156113002/diff/260001/chrome/browser/banners/app_banner_manager.cc#newcode67 chrome/browser/banners/app_banner_manager.cc:67: base::Time AppBannerManager::GetCurrentTime() { nit: ...
4 years, 4 months ago (2016-08-09 03:41:26 UTC) #48
dominickn
https://codereview.chromium.org/2156113002/diff/260001/chrome/browser/banners/app_banner_manager.cc File chrome/browser/banners/app_banner_manager.cc (right): https://codereview.chromium.org/2156113002/diff/260001/chrome/browser/banners/app_banner_manager.cc#newcode67 chrome/browser/banners/app_banner_manager.cc:67: base::Time AppBannerManager::GetCurrentTime() { On 2016/08/09 03:41:26, benwells wrote: > ...
4 years, 4 months ago (2016-08-09 08:28:57 UTC) #49
benwells
slgtm https://codereview.chromium.org/2156113002/diff/260001/chrome/browser/banners/app_banner_manager.cc File chrome/browser/banners/app_banner_manager.cc (right): https://codereview.chromium.org/2156113002/diff/260001/chrome/browser/banners/app_banner_manager.cc#newcode67 chrome/browser/banners/app_banner_manager.cc:67: base::Time AppBannerManager::GetCurrentTime() { On 2016/08/09 08:28:57, dominickn wrote: ...
4 years, 4 months ago (2016-08-10 03:36:05 UTC) #52
dominickn
On 2016/08/10 03:36:05, benwells wrote: > slgtm > > https://codereview.chromium.org/2156113002/diff/260001/chrome/browser/banners/app_banner_manager.cc > File chrome/browser/banners/app_banner_manager.cc (right): > ...
4 years, 4 months ago (2016-08-10 04:48:42 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2156113002/280001
4 years, 4 months ago (2016-08-10 04:49:55 UTC) #60
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 4 months ago (2016-08-10 04:54:31 UTC) #62
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/d223e62e9459d219141c09ac6b10f983c841fa45 Cr-Commit-Position: refs/heads/master@{#410959}
4 years, 4 months ago (2016-08-10 04:56:54 UTC) #64
Lei Zhang
On 2016/08/10 04:48:42, dominickn wrote: > TBR'ing thestig@ for browser.cc as it's a trivial API ...
4 years, 4 months ago (2016-08-16 02:44:54 UTC) #65
dominickn
4 years, 4 months ago (2016-08-16 03:15:56 UTC) #66
Message was sent while issue was closed.
On 2016/08/16 02:44:54, Lei Zhang wrote:
> On 2016/08/10 04:48:42, dominickn wrote:
> > TBR'ing thestig@ for browser.cc as it's a trivial API change.
> 
> lgtm, but please actually add the people being TBR'd so they get notified.

Whoops. Apologies, I'll make sure it's on the list next time. :)

Powered by Google App Engine
This is Rietveld 408576698