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

Issue 2589503002: Use exact pixel sizes instead of dip in webapp/WebAPK installability code (Closed)

Created:
4 years ago by pkotwicz
Modified:
3 years, 11 months ago
CC:
agrieve+watch_chromium.org, chromium-reviews, dominickn+watch_chromium.org, pkotwicz+watch_chromium.org, zpeng+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use exact pixel sizes instead of dip in webapp/WebAPK installability code This CL: - Makes the members of InstallableManager::InstallableParams use pixel units instead of device independent pixel units - Removes unnecessary conversions between pixels and device independent pixel units Note: android.content.res.Resources#getDimension() multiplies the device independent pixel measurement in resources by the current device scale factor BUG=675765

Patch Set 1 #

Total comments: 11

Patch Set 2 : Merge branch 'master' into dp_px #

Total comments: 2

Patch Set 3 : Merge branch 'master' into dp_px #

Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -343 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java View 1 6 chunks +14 lines, -17 lines 0 comments Download
M chrome/browser/android/banners/app_banner_manager_android.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/android/banners/app_banner_manager_android.cc View 4 chunks +15 lines, -15 lines 0 comments Download
M chrome/browser/android/shortcut_helper.h View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/android/shortcut_helper.cc View 2 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/android/webapk/webapk_update_data_fetcher.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h View 2 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc View 1 8 chunks +21 lines, -26 lines 0 comments Download
M chrome/browser/android/webapps/add_to_homescreen_manager.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/banners/app_banner_manager.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/banners/app_banner_manager.cc View 1 2 3 chunks +10 lines, -20 lines 0 comments Download
M chrome/browser/installable/installable_manager.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/installable/installable_manager.cc View 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/installable/installable_manager_browsertest.cc View 1 7 chunks +16 lines, -16 lines 0 comments Download
M chrome/browser/manifest/manifest_icon_downloader.h View 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/manifest/manifest_icon_downloader.cc View 1 2 chunks +3 lines, -12 lines 0 comments Download
M chrome/browser/manifest/manifest_icon_selector.h View 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/browser/manifest/manifest_icon_selector.cc View 1 3 chunks +3 lines, -17 lines 0 comments Download
M chrome/browser/manifest/manifest_icon_selector_unittest.cc View 1 14 chunks +89 lines, -167 lines 0 comments Download

Messages

Total messages: 26 (13 generated)
pkotwicz
Dominick, can you please take a look?
4 years ago (2016-12-18 04:50:23 UTC) #3
dominickn
This is quite a nice clean up, thanks for looking at it. I've been trying ...
4 years ago (2016-12-19 06:23:33 UTC) #4
dominickn
Also, you might want to change the title to be "Use exact pixel sizes instead ...
4 years ago (2016-12-19 06:24:50 UTC) #5
pkotwicz
Dominick, can you please take another look?
4 years ago (2016-12-19 23:51:58 UTC) #12
dominickn
+mlamouri for a sanity check. I couldn't think of any reason to use dip values ...
4 years ago (2016-12-20 00:00:10 UTC) #14
pkotwicz
Thanks, I'll upload rebases as separate patch sets in the future. https://codereview.chromium.org/2589503002/diff/40001/chrome/browser/banners/app_banner_manager.cc File chrome/browser/banners/app_banner_manager.cc (right): ...
4 years ago (2016-12-20 00:28:14 UTC) #15
mlamouri (slow - plz ping)
lgtm
3 years, 12 months ago (2016-12-23 12:07:05 UTC) #16
dominickn
lgtm
3 years, 11 months ago (2017-01-03 01:44:22 UTC) #17
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/2589503002/60001
3 years, 11 months ago (2017-01-03 20:07:01 UTC) #19
commit-bot: I haz the power
Failed to apply patch for chrome/browser/android/webapk/webapk_update_data_fetcher.cc: While running git apply --index -p1; error: patch failed: ...
3 years, 11 months ago (2017-01-03 20:54:54 UTC) #21
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/2589503002/60001
3 years, 11 months ago (2017-01-03 22:19:08 UTC) #23
commit-bot: I haz the power
Failed to apply patch for chrome/browser/android/webapk/webapk_update_data_fetcher.cc: While running git apply --index -p1; error: patch failed: ...
3 years, 11 months ago (2017-01-03 22:24:25 UTC) #25
dominickn
3 years, 11 months ago (2017-01-04 05:04:43 UTC) #26
On 2017/01/03 22:24:25, commit-bot: I haz the power wrote:
> Failed to apply patch for
> chrome/browser/android/webapk/webapk_update_data_fetcher.cc:
> While running git apply --index -p1;
>   error: patch failed:
> chrome/browser/android/webapk/webapk_update_data_fetcher.cc:108
>   error: chrome/browser/android/webapk/webapk_update_data_fetcher.cc: patch
does
> not apply
> 
> Patch:       chrome/browser/android/webapk/webapk_update_data_fetcher.cc
> Index: chrome/browser/android/webapk/webapk_update_data_fetcher.cc
> diff --git a/chrome/browser/android/webapk/webapk_update_data_fetcher.cc
> b/chrome/browser/android/webapk/webapk_update_data_fetcher.cc
> index
>
a5a20efebe050d58bcb9d3074a7fff60b8fd0524..53a944e6afaae8181b5262efa0eb85924cd964e5
> 100644
> --- a/chrome/browser/android/webapk/webapk_update_data_fetcher.cc
> +++ b/chrome/browser/android/webapk/webapk_update_data_fetcher.cc
> @@ -108,10 +108,10 @@ void WebApkUpdateDataFetcher::FetchInstallableData() {
>      return;
>  
>    InstallableParams params;
> -  params.ideal_icon_size_in_dp =
> -      ShortcutHelper::GetIdealHomescreenIconSizeInDp();
> -  params.minimum_icon_size_in_dp =
> -      ShortcutHelper::GetMinimumHomescreenIconSizeInDp();
> +  params.ideal_icon_size_in_px =
> +      ShortcutHelper::GetIdealHomescreenIconSizeInPx();
> +  params.minimum_icon_size_in_px =
> +      ShortcutHelper::GetMinimumHomescreenIconSizeInPx();
>    params.check_installable = true;
>    params.fetch_valid_icon = true;
>    InstallableManager::CreateForWebContents(web_contents());

You need to rebase this patch on master - it's failing because there is now a }
at the stop of this patch snippet on HEAD.

Powered by Google App Engine
This is Rietveld 408576698