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

Issue 45753004: ui: Repack resources. (Closed)

Created:
7 years, 1 month ago by tfarina
Modified:
7 years, 1 month ago
CC:
chromium-reviews, ben+aura_chromium.org, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, kalyank, sadrul, Jói
Visibility:
Public.

Description

ui: Make views_unittests not depend on chrome's packed_resources target. Depending on chrome's target is a layer violation, so we should break that dependency. BUG=299841, 176960, 144345 TEST=views_unittests R=tony@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=234537

Patch Set 1 #

Total comments: 4

Patch Set 2 : ui_test_pak #

Patch Set 3 : convert views_unittests to ui_test_pak #

Patch Set 4 : WithPakFile #

Patch Set 5 : check base::kInvalidPlatformFileValue #

Patch Set 6 : hack in ResourceBundle #

Patch Set 7 : rebase #

Total comments: 2

Patch Set 8 : LoadTestResources #

Total comments: 2

Patch Set 9 : less crazyness #

Total comments: 3

Patch Set 10 : does it matter? #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -9 lines) Patch
M ui/base/resource/resource_bundle.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -4 lines 0 comments Download
M ui/ui_resources.gypi View 1 1 chunk +34 lines, -0 lines 1 comment Download
M ui/views/run_all_unittests.cc View 1 2 3 4 5 2 chunks +9 lines, -1 line 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -4 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
tfarina
Would you build it like this? I haven't right a proper CL description yet. :/ ...
7 years, 1 month ago (2013-10-31 01:23:08 UTC) #1
tony
This seems like the right idea. I would try fixing the dependencies for ui/app_list/app_list.gyp and ...
7 years, 1 month ago (2013-10-31 19:48:34 UTC) #2
tfarina
Hey Tony, I'll play on the safe side. I introduced ui_test_pak target in ui_resources.gypi in ...
7 years, 1 month ago (2013-10-31 23:30:53 UTC) #3
tony
On 2013/10/31 23:30:53, tfarina wrote: > Hey Tony, I'll play on the safe side. > ...
7 years, 1 month ago (2013-10-31 23:33:05 UTC) #4
tfarina
On 2013/10/31 23:33:05, tony wrote: > On 2013/10/31 23:30:53, tfarina wrote: > > Hey Tony, ...
7 years, 1 month ago (2013-10-31 23:43:13 UTC) #5
tfarina
See? It is not that simple, I think InitSharedInstanceWithLocale() + packed_resources does more "necessary" things. ...
7 years, 1 month ago (2013-11-01 00:22:42 UTC) #6
tfarina
oh, wait, I really don't understand how the local change to views_unittests is affecting ui/gfx/render_text_unittest.cc ...
7 years, 1 month ago (2013-11-01 00:23:58 UTC) #7
tfarina
InitSharedInstanceWithLocale() does a lot more things than InitSharedInstanceWithPakPath(). And LoadCommonResources() is tied to chrome_100_percent.pak. This ...
7 years, 1 month ago (2013-11-01 00:54:57 UTC) #8
tfarina
may be the failures I saw from gfx unittests were not related, as I'm seeing ...
7 years, 1 month ago (2013-11-01 13:20:25 UTC) #9
tfarina
No, the same thing. Tony, do have any idea/suggestions now? Thanks!
7 years, 1 month ago (2013-11-01 15:26:07 UTC) #10
tony
Loading chrome*.pak in ui is https://code.google.com/p/chromium/issues/detail?id=176960 . We should maybe fix that first? You might ...
7 years, 1 month ago (2013-11-01 16:54:58 UTC) #11
tony
This might be too big of a task. I would try using InitSharedInstanceWithPakFile() instead of ...
7 years, 1 month ago (2013-11-01 16:55:43 UTC) #12
tfarina
Tony, For InitSharedInstanceWithPakFile(), how I will know the pak descriptor for the ui_test_pak? I create ...
7 years, 1 month ago (2013-11-01 22:12:12 UTC) #13
tony
InitSharedInstanceWithPakFile takes a base::PlatformFile (which happens to be a file descriptor on posix systems). You ...
7 years, 1 month ago (2013-11-01 22:43:59 UTC) #14
tfarina
On 2013/11/01 22:43:59, tony wrote: > InitSharedInstanceWithPakFile takes a base::PlatformFile (which happens to be a ...
7 years, 1 month ago (2013-11-01 23:26:12 UTC) #15
tony
On 2013/11/01 23:26:12, tfarina wrote: > But not finding IDR_BUTTON_NORMAL? That is strange. Hmm, weird. ...
7 years, 1 month ago (2013-11-02 00:04:14 UTC) #16
tfarina
On 2013/11/02 00:04:14, tony wrote: > On 2013/11/01 23:26:12, tfarina wrote: > > > But ...
7 years, 1 month ago (2013-11-02 00:43:29 UTC) #17
tfarina
On 2013/11/02 00:43:29, tfarina wrote: > I went back with WithPakPath() + a "hack" in ...
7 years, 1 month ago (2013-11-02 00:51:42 UTC) #18
tfarina
It seems to be green! Yay! http://build.chromium.org/p/tryserver.chromium/builders/linux_chromeos/builds/171005 the result is not attached, I think, because ...
7 years, 1 month ago (2013-11-02 01:22:25 UTC) #19
tfarina
Tony, do you think this is good to go? Do you have any other concerns/suggestions?
7 years, 1 month ago (2013-11-02 20:02:55 UTC) #20
tony
https://codereview.chromium.org/45753004/diff/470001/ui/base/resource/resource_bundle.cc File ui/base/resource/resource_bundle.cc (right): https://codereview.chromium.org/45753004/diff/470001/ui/base/resource/resource_bundle.cc#newcode176 ui/base/resource/resource_bundle.cc:176: scoped_ptr<DataPack> data_pack(new DataPack(SCALE_FACTOR_100P)); This code that tries to load ...
7 years, 1 month ago (2013-11-04 17:52:39 UTC) #21
tfarina
https://codereview.chromium.org/45753004/diff/470001/ui/base/resource/resource_bundle.cc File ui/base/resource/resource_bundle.cc (right): https://codereview.chromium.org/45753004/diff/470001/ui/base/resource/resource_bundle.cc#newcode176 ui/base/resource/resource_bundle.cc:176: scoped_ptr<DataPack> data_pack(new DataPack(SCALE_FACTOR_100P)); On 2013/11/04 17:52:40, tony wrote: > ...
7 years, 1 month ago (2013-11-05 01:04:44 UTC) #22
tony
https://codereview.chromium.org/45753004/diff/540001/ui/base/resource/resource_bundle.cc File ui/base/resource/resource_bundle.cc (right): https://codereview.chromium.org/45753004/diff/540001/ui/base/resource/resource_bundle.cc#newcode295 ui/base/resource/resource_bundle.cc:295: locale_resources_data_.reset(data_pack.release()); What are you trying to do here? Why ...
7 years, 1 month ago (2013-11-05 07:28:28 UTC) #23
tfarina
https://codereview.chromium.org/45753004/diff/650001/ui/base/resource/resource_bundle.cc File ui/base/resource/resource_bundle.cc (right): https://codereview.chromium.org/45753004/diff/650001/ui/base/resource/resource_bundle.cc#newcode296 ui/base/resource/resource_bundle.cc:296: data_pack.reset(new DataPack(ui::SCALE_FACTOR_100P)); does this sounds more reasonable? is it ...
7 years, 1 month ago (2013-11-07 00:05:46 UTC) #24
tony
I noticed that the constructor for DataPack is not explicit. If you could fix that ...
7 years, 1 month ago (2013-11-07 18:13:37 UTC) #25
tfarina
Mind take a (another :)) look? Thanks! https://codereview.chromium.org/45753004/diff/650001/ui/base/resource/resource_bundle.cc File ui/base/resource/resource_bundle.cc (right): https://codereview.chromium.org/45753004/diff/650001/ui/base/resource/resource_bundle.cc#newcode296 ui/base/resource/resource_bundle.cc:296: data_pack.reset(new DataPack(ui::SCALE_FACTOR_100P)); ...
7 years, 1 month ago (2013-11-09 00:24:34 UTC) #26
tfarina
Tony, ping??
7 years, 1 month ago (2013-11-11 15:02:13 UTC) #27
tony
LGTM https://codereview.chromium.org/45753004/diff/720001/ui/ui_resources.gypi File ui/ui_resources.gypi (right): https://codereview.chromium.org/45753004/diff/720001/ui/ui_resources.gypi#newcode51 ui/ui_resources.gypi:51: { Nit: Weird indent. I guess the whole ...
7 years, 1 month ago (2013-11-11 17:22:36 UTC) #28
tfarina
Scott, can I get your approval for the rest of ui/ (Ben might be busy)? ...
7 years, 1 month ago (2013-11-11 18:03:12 UTC) #29
sky
LGTM
7 years, 1 month ago (2013-11-11 21:07:56 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tfarina@chromium.org/45753004/720001
7 years, 1 month ago (2013-11-11 21:12:50 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tfarina@chromium.org/45753004/720001
7 years, 1 month ago (2013-11-12 13:24:05 UTC) #32
commit-bot: I haz the power
7 years, 1 month ago (2013-11-12 16:24:43 UTC) #33
Message was sent while issue was closed.
Change committed as 234537

Powered by Google App Engine
This is Rietveld 408576698