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

Issue 10928231: Fix ResourceBundleImageSource (Closed)

Created:
8 years, 3 months ago by pkotwicz
Modified:
8 years, 3 months ago
Reviewers:
tony, oshima, Xianzhu, huangs
CC:
chromium-reviews, huangs, oshima, klobag.chromium
Visibility:
Public.

Description

Fix ResourceBundleImageSource so that it does not crash when 1.4x resources are requested. BUG=148841 Test=ResourceBundle.GetImageNamed Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157201 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157583

Patch Set 1 #

Total comments: 3

Patch Set 2 : Nits as per huang #

Patch Set 3 : Fixed unittest crash #

Total comments: 1

Patch Set 4 : #

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Patch Set 7 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -44 lines) Patch
M ui/base/resource/resource_bundle.h View 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/base/resource/resource_bundle.cc View 1 2 3 4 4 chunks +51 lines, -39 lines 0 comments Download
M ui/base/resource/resource_bundle_unittest.cc View 1 2 3 3 chunks +61 lines, -0 lines 0 comments Download
M ui/base/ui_base_switches.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/base/ui_base_switches.cc View 1 chunk +5 lines, -4 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
pkotwicz
This is a subset of Xianzhu's CL. It prevents a crash when a resource for ...
8 years, 3 months ago (2012-09-17 15:02:10 UTC) #1
pkotwicz
8 years, 3 months ago (2012-09-17 16:32:54 UTC) #2
sky
LGTM
8 years, 3 months ago (2012-09-17 16:56:11 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10928231/1
8 years, 3 months ago (2012-09-17 17:03:25 UTC) #4
huangs
Sorry for taking this long... http://codereview.chromium.org/10928231/diff/1/ui/base/resource/resource_bundle.cc File ui/base/resource/resource_bundle.cc (right): http://codereview.chromium.org/10928231/diff/1/ui/base/resource/resource_bundle.cc#newcode66 ui/base/resource/resource_bundle.cc:66: // An ImageSkiaSource that ...
8 years, 3 months ago (2012-09-17 17:53:45 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10928231/10002
8 years, 3 months ago (2012-09-17 18:32:33 UTC) #6
commit-bot: I haz the power
Change committed as 157201
8 years, 3 months ago (2012-09-17 21:21:37 UTC) #7
mmenke
This CL seems to have broken ui_unittests (BytesFormattingTest.FormatBytes). All runs prior to this CL passed, ...
8 years, 3 months ago (2012-09-17 22:29:40 UTC) #8
mmenke
On 2012/09/17 22:29:40, Matt Menke wrote: > This CL seems to have broken ui_unittests (BytesFormattingTest.FormatBytes). ...
8 years, 3 months ago (2012-09-17 22:30:38 UTC) #9
pkotwicz
Scott, can you please have another look? I updated the unittests such that the ResourceBundle.GetImageNamed() ...
8 years, 3 months ago (2012-09-18 15:26:40 UTC) #10
sky
I'm swapping myself with Tony. Arbitrarily making RB implement WeakPtr makes me nervous.
8 years, 3 months ago (2012-09-18 18:10:36 UTC) #11
tony
I agree with sky. In what situations would the gfx::Image returned by GetImageNamed() outlive the ...
8 years, 3 months ago (2012-09-18 18:43:42 UTC) #12
pkotwicz
The ResourceBundle is destroyed after the BrowserMainLoop has finished running, so it does not seem ...
8 years, 3 months ago (2012-09-18 21:10:21 UTC) #13
tony
LGTM
8 years, 3 months ago (2012-09-18 22:44:45 UTC) #14
Xianzhu
http://codereview.chromium.org/10928231/diff/29001/ui/base/resource/resource_bundle.cc File ui/base/resource/resource_bundle.cc (right): http://codereview.chromium.org/10928231/diff/29001/ui/base/resource/resource_bundle.cc#newcode130 ui/base/resource/resource_bundle.cc:130: // The scaled resource pack may have the 1x ...
8 years, 3 months ago (2012-09-18 22:58:04 UTC) #15
oshima
http://codereview.chromium.org/10928231/diff/29001/ui/base/resource/resource_bundle.cc File ui/base/resource/resource_bundle.cc (right): http://codereview.chromium.org/10928231/diff/29001/ui/base/resource/resource_bundle.cc#newcode130 ui/base/resource/resource_bundle.cc:130: // The scaled resource pack may have the 1x ...
8 years, 3 months ago (2012-09-18 23:41:48 UTC) #16
Xianzhu
On 2012/09/18 23:41:48, oshima wrote: > I think Android's scale factor is static (sorry if ...
8 years, 3 months ago (2012-09-19 00:11:25 UTC) #17
oshima
(bcc'ing other reviews) On Tue, Sep 18, 2012 at 5:11 PM, <wangxianzhu@chromium.org> wrote: > On ...
8 years, 3 months ago (2012-09-19 00:28:09 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10928231/26006
8 years, 3 months ago (2012-09-19 16:54:31 UTC) #19
commit-bot: I haz the power
8 years, 3 months ago (2012-09-19 19:20:21 UTC) #20
Change committed as 157583

Powered by Google App Engine
This is Rietveld 408576698