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

Issue 7128001: base: Move UI code out of SysInfo. (Closed)

Created:
9 years, 6 months ago by Daniel Erat
Modified:
9 years, 6 months ago
CC:
chromium-reviews, pam+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

base: Move UI code out of SysInfo. This moves GetPrimaryDisplayDimensions() and DisplayCount() out of base and into a new DisplayUtils class (currently alongside the metrics code, since that's the only place that they're called). These methods add a GDK dependency that prevents Chrome OS from including process_util (which depends on SysInfo) in its libchrome library. BUG=chromium-os:16153 TEST=moved existing unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89194

Patch Set 1 #

Patch Set 2 : change mac include #

Patch Set 3 : remove DCHECKs :-( #

Patch Set 4 : merge #

Total comments: 1

Patch Set 5 : move to display_utils.h/cc #

Patch Set 6 : add #endif comment and remove cosmetic changes #

Total comments: 4

Patch Set 7 : back to unit tests #

Total comments: 8

Patch Set 8 : use MessageLoop::Quit() #

Patch Set 9 : simplify testing code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -108 lines) Patch
M base/sys_info.h View 1 chunk +0 lines, -7 lines 0 comments Download
M base/sys_info_mac.cc View 1 chunk +0 lines, -44 lines 0 comments Download
M base/sys_info_posix.cc View 2 chunks +0 lines, -28 lines 0 comments Download
M base/sys_info_unittest.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -13 lines 0 comments Download
M base/sys_info_win.cc View 1 chunk +0 lines, -14 lines 0 comments Download
A chrome/browser/metrics/display_utils.h View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
A chrome/browser/metrics/display_utils_mac.cc View 1 2 3 4 1 chunk +51 lines, -0 lines 0 comments Download
A chrome/browser/metrics/display_utils_posix.cc View 1 2 3 4 5 6 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/metrics/display_utils_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +25 lines, -0 lines 0 comments Download
A chrome/browser/metrics/display_utils_win.cc View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M chrome/browser/metrics/metrics_log.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Daniel Erat
I initially added UI thread DCHECKs to the GDK versions of these methods but removed ...
9 years, 6 months ago (2011-06-07 20:35:42 UTC) #1
Evan Martin
http://codereview.chromium.org/7128001/diff/4002/chrome/browser/metrics/metrics_log.h File chrome/browser/metrics/metrics_log.h (right): http://codereview.chromium.org/7128001/diff/4002/chrome/browser/metrics/metrics_log.h#newcode112 chrome/browser/metrics/metrics_log.h:112: static int DisplayCount(); Now that I see these here, ...
9 years, 6 months ago (2011-06-07 21:22:40 UTC) #2
Daniel Erat
On Tue, Jun 7, 2011 at 14:22, <evan@chromium.org> wrote: > http://codereview.chromium.org/7128001/diff/4002/chrome/browser/metrics/metrics_log.h > File chrome/browser/metrics/metrics_log.h (right): ...
9 years, 6 months ago (2011-06-07 22:11:14 UTC) #3
Evan Martin
On 2011/06/07 22:11:14, Daniel Erat wrote: > Doesn't matter to me as long as they're ...
9 years, 6 months ago (2011-06-07 22:15:37 UTC) #4
Daniel Erat
On 2011/06/07 22:15:37, Evan Martin wrote: > On 2011/06/07 22:11:14, Daniel Erat wrote: > > ...
9 years, 6 months ago (2011-06-08 21:53:12 UTC) #5
Evan Martin
LGTM with a minor gyp fix http://codereview.chromium.org/7128001/diff/8002/chrome/browser/metrics/display_utils_posix.cc File chrome/browser/metrics/display_utils_posix.cc (right): http://codereview.chromium.org/7128001/diff/8002/chrome/browser/metrics/display_utils_posix.cc#newcode7 chrome/browser/metrics/display_utils_posix.cc:7: #if !defined(OS_MACOSX) Rather ...
9 years, 6 months ago (2011-06-08 22:57:17 UTC) #6
Daniel Erat
Paweł, thanks for the earlier (off-list) feedback. Mind taking another look at the tests? http://codereview.chromium.org/7128001/diff/8002/chrome/browser/metrics/display_utils_posix.cc ...
9 years, 6 months ago (2011-06-09 21:43:12 UTC) #7
Evan Martin
LGTM++
9 years, 6 months ago (2011-06-09 21:54:47 UTC) #8
Paweł Hajdan Jr.
http://codereview.chromium.org/7128001/diff/10003/chrome/browser/metrics/display_utils_unittest.cc File chrome/browser/metrics/display_utils_unittest.cc (right): http://codereview.chromium.org/7128001/diff/10003/chrome/browser/metrics/display_utils_unittest.cc#newcode17 chrome/browser/metrics/display_utils_unittest.cc:17: if (!BrowserThread::PostTask( Do you need to Run the MessageLoop ...
9 years, 6 months ago (2011-06-10 06:42:18 UTC) #9
Daniel Erat
http://codereview.chromium.org/7128001/diff/10003/chrome/browser/metrics/display_utils_unittest.cc File chrome/browser/metrics/display_utils_unittest.cc (right): http://codereview.chromium.org/7128001/diff/10003/chrome/browser/metrics/display_utils_unittest.cc#newcode17 chrome/browser/metrics/display_utils_unittest.cc:17: if (!BrowserThread::PostTask( On 2011/06/10 06:42:18, Paweł Hajdan Jr. wrote: ...
9 years, 6 months ago (2011-06-13 22:51:34 UTC) #10
Paweł Hajdan Jr.
http://codereview.chromium.org/7128001/diff/10003/chrome/browser/metrics/display_utils_unittest.cc File chrome/browser/metrics/display_utils_unittest.cc (right): http://codereview.chromium.org/7128001/diff/10003/chrome/browser/metrics/display_utils_unittest.cc#newcode17 chrome/browser/metrics/display_utils_unittest.cc:17: if (!BrowserThread::PostTask( On 2011/06/13 22:51:34, Daniel Erat wrote: > ...
9 years, 6 months ago (2011-06-14 07:33:55 UTC) #11
Daniel Erat
On Tue, Jun 14, 2011 at 00:33, <phajdan.jr@chromium.org> wrote: > > http://codereview.chromium.org/7128001/diff/10003/chrome/browser/metrics/display_utils_unittest.cc > File chrome/browser/metrics/display_utils_unittest.cc ...
9 years, 6 months ago (2011-06-14 18:39:11 UTC) #12
Paweł Hajdan Jr.
9 years, 6 months ago (2011-06-14 19:51:12 UTC) #13
LGTM

Powered by Google App Engine
This is Rietveld 408576698