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

Issue 6854002: Merge monitor_reconfigure into powerd. (Closed)

Created:
9 years, 8 months ago by marcheu
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

Merge monitor_reconfigure into powerd. BUG=chromium-os:10321, chromium-os:11596, chromium-os:13430, chromium-os-partner:2313 TEST=remove /etc/udev/rules.d/99-monitor-hotplug.rules before testing; plug/unplug monitors, check that things work ok including backlight. Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=98eacc9

Patch Set 1 #

Patch Set 2 : Second version with nits. #

Total comments: 43

Patch Set 3 : Address first round of reviews, fixing the tests still a TODO. #

Total comments: 19

Patch Set 4 : Address second round of comments. #

Total comments: 29

Patch Set 5 : Address the third round of commits. #

Patch Set 6 : Indentation nit. #

Total comments: 28

Patch Set 7 : Round 5 #

Total comments: 24

Patch Set 8 : Round 6 #

Total comments: 14

Patch Set 9 : Round 6. Also did I forget mock_monitor_reconfigure.h before? #

Total comments: 8

Patch Set 10 : Round 6 #

Total comments: 14

Patch Set 11 : Review 8 #

Patch Set 12 : More bikeshedding. #

Patch Set 13 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+915 lines, -5 lines) Patch
M README View 1 chunk +2 lines, -0 lines 0 comments Download
M SConstruct View 1 2 3 4 5 6 7 8 3 chunks +18 lines, -1 line 0 comments Download
A drm-tool.cc View 1 2 3 4 5 6 7 8 1 chunk +33 lines, -0 lines 0 comments Download
A mock_monitor_reconfigure.h View 1 2 3 4 5 6 7 8 1 chunk +20 lines, -0 lines 0 comments Download
A monitor_reconfigure.h View 1 2 3 4 5 6 7 8 1 chunk +100 lines, -0 lines 0 comments Download
A monitor_reconfigure.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +254 lines, -0 lines 0 comments Download
M powerd.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -0 lines 0 comments Download
M powerd.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -1 line 0 comments Download
M powerd_main.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -2 lines 0 comments Download
M powerd_unittest.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -1 line 0 comments Download
A resolution_selector.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +85 lines, -0 lines 0 comments Download
A resolution_selector.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +108 lines, -0 lines 0 comments Download
A resolution_selector_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +152 lines, -0 lines 0 comments Download
A udev_controller.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +48 lines, -0 lines 0 comments Download
A udev_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +78 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
marcheu
First cut at powerd + monitor_reconfigure merge. Please take a look, I'll port the tests ...
9 years, 8 months ago (2011-04-13 22:59:26 UTC) #1
Daniel Erat
http://codereview.chromium.org/6854002/diff/3001/SConstruct File SConstruct (right): http://codereview.chromium.org/6854002/diff/3001/SConstruct#newcode149 SConstruct:149: tests.append(powerman_unittest_env.Program('powerman_unittest', deps)) you should add the resolution selector test ...
9 years, 8 months ago (2011-04-13 23:33:26 UTC) #2
marcheu
http://codereview.chromium.org/6854002/diff/3001/drm-tool.cc File drm-tool.cc (right): http://codereview.chromium.org/6854002/diff/3001/drm-tool.cc#newcode19 drm-tool.cc:19: class DrmCallBack : public power_manager::UdevCallBack { On 2011/04/13 23:33:26, ...
9 years, 8 months ago (2011-04-14 02:23:55 UTC) #3
tfarina
Just did a quickly look at some files as I have to sleep now. Please ...
9 years, 8 months ago (2011-04-14 02:36:05 UTC) #4
marcheu
http://codereview.chromium.org/6854002/diff/16/drm-tool.cc File drm-tool.cc (right): http://codereview.chromium.org/6854002/diff/16/drm-tool.cc#newcode13 drm-tool.cc:13: #include "base/scoped_ptr.h" On 2011/04/14 02:36:05, tfarina wrote: > I ...
9 years, 8 months ago (2011-04-14 02:52:10 UTC) #5
tfarina
http://codereview.chromium.org/6854002/diff/16/udev_listener.cc File udev_listener.cc (right): http://codereview.chromium.org/6854002/diff/16/udev_listener.cc#newcode9 udev_listener.cc:9: #include "power_manager/udev_listener.h" On 2011/04/14 02:52:10, marcheu wrote: > On ...
9 years, 8 months ago (2011-04-14 14:53:58 UTC) #6
tfarina
http://codereview.chromium.org/6854002/diff/1015/monitor_reconfigure.cc File monitor_reconfigure.cc (right): http://codereview.chromium.org/6854002/diff/1015/monitor_reconfigure.cc#newcode16 monitor_reconfigure.cc:16: extra line. http://codereview.chromium.org/6854002/diff/1015/monitor_reconfigure.cc#newcode25 monitor_reconfigure.cc:25: static const char kLcdOutputName[] = ...
9 years, 8 months ago (2011-04-14 15:11:41 UTC) #7
marcheu
Did the changes, still need to figure out why the resolution test doesn't run yet. ...
9 years, 8 months ago (2011-04-14 17:43:40 UTC) #8
marcheu
On 2011/04/14 17:43:40, marcheu wrote: > Did the changes, still need to figure out why ...
9 years, 8 months ago (2011-04-14 18:37:46 UTC) #9
tfarina
http://codereview.chromium.org/6854002/diff/7015/monitor_reconfigure.cc File monitor_reconfigure.cc (right): http://codereview.chromium.org/6854002/diff/7015/monitor_reconfigure.cc#newcode5 monitor_reconfigure.cc:5: #include "power_manager/backlight_controller.h" While you are here, move this include ...
9 years, 8 months ago (2011-04-14 18:54:18 UTC) #10
marcheu
Should have fixed all nits. http://codereview.chromium.org/6854002/diff/7015/monitor_reconfigure.cc File monitor_reconfigure.cc (right): http://codereview.chromium.org/6854002/diff/7015/monitor_reconfigure.cc#newcode5 monitor_reconfigure.cc:5: #include "power_manager/backlight_controller.h" On 2011/04/14 ...
9 years, 8 months ago (2011-04-14 19:01:51 UTC) #11
Daniel Erat
I started writing these before the latest upload but they're still relevant. http://codereview.chromium.org/6854002/diff/7015/monitor_reconfigure.h File monitor_reconfigure.h ...
9 years, 8 months ago (2011-04-14 19:07:24 UTC) #12
Daniel Erat
http://codereview.chromium.org/6854002/diff/7021/monitor_reconfigure.cc File monitor_reconfigure.cc (right): http://codereview.chromium.org/6854002/diff/7021/monitor_reconfigure.cc#newcode11 monitor_reconfigure.cc:11: #include "base/command_line.h" don't think this is used http://codereview.chromium.org/6854002/diff/7021/monitor_reconfigure.cc#newcode13 monitor_reconfigure.cc:13: ...
9 years, 8 months ago (2011-04-14 19:18:46 UTC) #13
marcheu
http://codereview.chromium.org/6854002/diff/7015/monitor_reconfigure.h File monitor_reconfigure.h (right): http://codereview.chromium.org/6854002/diff/7015/monitor_reconfigure.h#newcode5 monitor_reconfigure.h:5: #ifndef POWER_MANAGER_MONITOR_RECONFIGURE_MAIN_H_ On 2011/04/14 19:07:24, Daniel Erat wrote: > ...
9 years, 8 months ago (2011-04-14 19:54:57 UTC) #14
tfarina
http://codereview.chromium.org/6854002/diff/7015/resolution_selector_unittest.cc File resolution_selector_unittest.cc (right): http://codereview.chromium.org/6854002/diff/7015/resolution_selector_unittest.cc#newcode12 resolution_selector_unittest.cc:12: #include "base/string_util.h" On 2011/04/14 19:54:57, marcheu wrote: > On ...
9 years, 8 months ago (2011-04-14 19:58:29 UTC) #15
tfarina
http://codereview.chromium.org/6854002/diff/6023/monitor_reconfigure.h File monitor_reconfigure.h (right): http://codereview.chromium.org/6854002/diff/6023/monitor_reconfigure.h#newcode9 monitor_reconfigure.h:9: #include <string> you can get rid of this include. ...
9 years, 8 months ago (2011-04-14 20:03:57 UTC) #16
marcheu
http://codereview.chromium.org/6854002/diff/6023/monitor_reconfigure.h File monitor_reconfigure.h (right): http://codereview.chromium.org/6854002/diff/6023/monitor_reconfigure.h#newcode9 monitor_reconfigure.h:9: #include <string> On 2011/04/14 20:03:57, tfarina wrote: > you ...
9 years, 8 months ago (2011-04-14 20:41:23 UTC) #17
Daniel Erat
LGTM after a few nits! http://codereview.chromium.org/6854002/diff/24/resolution_selector.cc File resolution_selector.cc (right): http://codereview.chromium.org/6854002/diff/24/resolution_selector.cc#newcode11 resolution_selector.cc:11: using std::string; nit: delete ...
9 years, 8 months ago (2011-04-14 20:48:37 UTC) #18
marcheu
Patch set should say round 7, but my fat fingers slipped. oops. http://codereview.chromium.org/6854002/diff/24/resolution_selector.cc File resolution_selector.cc ...
9 years, 8 months ago (2011-04-14 20:59:54 UTC) #19
tfarina
http://codereview.chromium.org/6854002/diff/1021/resolution_selector.h File resolution_selector.h (right): http://codereview.chromium.org/6854002/diff/1021/resolution_selector.h#newcode23 resolution_selector.h:23: Mode(int width, int height, std::string name, int id) Could ...
9 years, 8 months ago (2011-04-15 15:00:37 UTC) #20
marcheu
9 years, 8 months ago (2011-04-15 17:32:23 UTC) #21
http://codereview.chromium.org/6854002/diff/1021/resolution_selector.h
File resolution_selector.h (right):

http://codereview.chromium.org/6854002/diff/1021/resolution_selector.h#newcode23
resolution_selector.h:23: Mode(int width, int height, std::string name, int id)
On 2011/04/15 15:00:37, tfarina wrote:
> Could you move the implementation to the source file?

Done.

http://codereview.chromium.org/6854002/diff/1021/resolution_selector.h#newcode53
resolution_selector.h:53: static const int kMaxProjectorPixels;
On 2011/04/15 15:00:37, tfarina wrote:
> Is this constant going to be used by someone else? I didn't check. If not,
could
> you move to the source file into an unnamed namespace?

No it's used by the unittest. Please look at the code next time.

http://codereview.chromium.org/6854002/diff/1021/resolution_selector.h#newcode55
resolution_selector.h:55: ResolutionSelector() {}
On 2011/04/15 15:00:37, tfarina wrote:
> please, move the implementation to the source file.

Done.

http://codereview.chromium.org/6854002/diff/1021/resolution_selector.h#newcode63
resolution_selector.h:63: return mode_a.width * mode_a.height > mode_b.width *
mode_b.height;
On 2011/04/15 15:00:37, tfarina wrote:
> Could you move the implementation to the source file?

Done.

http://codereview.chromium.org/6854002/diff/1021/udev_controller.h
File udev_controller.h (right):

http://codereview.chromium.org/6854002/diff/1021/udev_controller.h#newcode10
udev_controller.h:10: #include <string>
On 2011/04/15 15:00:37, tfarina wrote:
> please, add a line between libudev.h and string.

Done.

http://codereview.chromium.org/6854002/diff/1021/udev_controller.h#newcode26
udev_controller.h:26: bool Init();
On 2011/04/15 15:00:37, tfarina wrote:
> please add a line above.

Done.

http://codereview.chromium.org/6854002/diff/1021/udev_controller.h#newcode38
udev_controller.h:38: std::string subsystem_;
On 2011/04/15 15:00:37, tfarina wrote:
> I'd suggest moving this to line 35 (so it matches with the order in the ctor).
> Also, could you document this variable?

Done.

Powered by Google App Engine
This is Rietveld 408576698