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

Issue 10857019: wallpaper-webui: Make sure the wallpaper thumbnails are appropriately scaled. (Closed)

Created:
8 years, 4 months ago by sadrul
Modified:
8 years, 4 months ago
Reviewers:
pkotwicz, Ivan Korotkov
CC:
chromium-reviews, stevenjb+watch_chromium.org, oshima+watch_chromium.org
Visibility:
Public.

Description

wallpaper-webui: Make sure the wallpaper thumbnails are appropriately scaled. This gets rid of an implicit ImageSkia -> SkBitmap conversion. BUG=141146 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=151945

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -7 lines) Patch
M chrome/browser/ui/webui/options2/chromeos/user_image_source.cc View 1 chunk +1 line, -1 line 1 comment Download
M chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.h View 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc View 9 chunks +22 lines, -6 lines 4 comments Download

Messages

Total messages: 6 (0 generated)
sadrul
8 years, 4 months ago (2012-08-15 20:22:20 UTC) #1
Ivan Korotkov
lgtm http://codereview.chromium.org/10857019/diff/1/chrome/browser/ui/webui/options2/chromeos/user_image_source.cc File chrome/browser/ui/webui/options2/chromeos/user_image_source.cc (right): http://codereview.chromium.org/10857019/diff/1/chrome/browser/ui/webui/options2/chromeos/user_image_source.cc#newcode12 chrome/browser/ui/webui/options2/chromeos/user_image_source.cc:12: #include "chrome/browser/ui/webui/web_ui_util.h" Ouch. http://codereview.chromium.org/10857019/diff/1/chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc File chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc (right): http://codereview.chromium.org/10857019/diff/1/chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc#newcode160 ...
8 years, 4 months ago (2012-08-15 20:36:03 UTC) #2
sadrul
http://codereview.chromium.org/10857019/diff/1/chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc File chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc (right): http://codereview.chromium.org/10857019/diff/1/chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc#newcode160 chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc:160: ui::ScaleFactor scale_factor; On 2012/08/15 20:36:03, Ivan Korotkov wrote: > ...
8 years, 4 months ago (2012-08-15 20:53:28 UTC) #3
pkotwicz
lgtm
8 years, 4 months ago (2012-08-15 21:25:21 UTC) #4
sadrul
http://codereview.chromium.org/10857019/diff/1/chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc File chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc (right): http://codereview.chromium.org/10857019/diff/1/chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc#newcode160 chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc:160: ui::ScaleFactor scale_factor; On 2012/08/15 20:53:28, sadrul wrote: > On ...
8 years, 4 months ago (2012-08-15 22:28:53 UTC) #5
Ivan Korotkov
8 years, 4 months ago (2012-08-16 08:44:17 UTC) #6
http://codereview.chromium.org/10857019/diff/1/chrome/browser/ui/webui/option...
File chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc
(right):

http://codereview.chromium.org/10857019/diff/1/chrome/browser/ui/webui/option...
chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc:160:
ui::ScaleFactor scale_factor;
On 2012/08/15 22:28:53, sadrul wrote:
> On 2012/08/15 20:53:28, sadrul wrote:
> > On 2012/08/15 20:36:03, Ivan Korotkov wrote:
> > > Does the URL ever include username@domain? In that case, any such
> occurrences
> > > without trailing @<factor>x part will be parsed improperly.
> > 
> > Good point! I discussed with bshe@, and username@domain indeed can be part
of
> > the URL. However, the url is of the format
> > 'chrome://.../custom_user@domain?id=...' etc., and it looks like the parsing
> > code will return NONE for the scale factor in this case (even if domain
starts
> > with '1x' or '2x'), which is the current behaviour anyway. I think this is
> safe?
> 
> I have also submitted <crxref style="background-image:
url(chrome-extension://ppnlfijacbhfpjgkafbeiaklmgoljooo/res/type/codereview.png);
">http://codereview.chromium.org/10837270/</crxref> that should help
> avoiding similar problem in the future.

Thanks! With CL 10837270 submitted it should be safe to use.  Prior to it,
|path| would only contain username, as @domain would be cut in absence of
@factor.

Powered by Google App Engine
This is Rietveld 408576698