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

Issue 476103002: Make DisplayInfoProvider an interface (Closed)

Created:
6 years, 4 months ago by tmpsantos
Modified:
6 years, 4 months ago
Reviewers:
Lei Zhang, James Cook
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
git@github.com:tmpsantos/chromium.git@display_info
Project:
chromium
Visibility:
Public.

Description

Make DisplayInfoProvider an interface Now is up to the component embedding the SystemInfo API to implement the DisplayInfoProvider. The motivation for this change is we want to move the SystemInfo API to extensions/ but DisplayInfoProvider depends on ash/, which will link with ui/views/, and that is way too big. The ultimate goal is to have SystemInfo on the app_shell without increasing its footprint considerably. BUG=392842 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291250

Patch Set 1 #

Patch Set 2 : Fixed GN and Windows build #

Total comments: 7

Patch Set 3 : Addressed review comments. #

Total comments: 14

Patch Set 4 : Addressed review comments 2 #

Total comments: 5

Patch Set 5 : Added a comment about a global intentionally leaking. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+366 lines, -1575 lines) Patch
M chrome/browser/extensions/BUILD.gn View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/system_display/display_info_provider.h View 1 2 2 chunks +28 lines, -11 lines 0 comments Download
M chrome/browser/extensions/api/system_display/display_info_provider.cc View 1 2 3 4 4 chunks +12 lines, -7 lines 0 comments Download
D chrome/browser/extensions/api/system_display/display_info_provider_aura.cc View 1 chunk +0 lines, -22 lines 0 comments Download
D chrome/browser/extensions/api/system_display/display_info_provider_chromeos.cc View 1 chunk +0 lines, -386 lines 0 comments Download
D chrome/browser/extensions/api/system_display/display_info_provider_chromeos_unittest.cc View 1 chunk +0 lines, -893 lines 0 comments Download
D chrome/browser/extensions/api/system_display/display_info_provider_mac.cc View 1 chunk +0 lines, -22 lines 0 comments Download
D chrome/browser/extensions/api/system_display/display_info_provider_win.cc View 1 chunk +0 lines, -77 lines 0 comments Download
M chrome/browser/extensions/api/system_display/system_display_apitest.cc View 1 2 4 chunks +4 lines, -1 line 0 comments Download
A chrome/browser/extensions/display_info_provider_aura.h View 1 2 3 1 chunk +31 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/display_info_provider_aura.cc View 1 2 3 1 chunk +16 lines, -4 lines 0 comments Download
A chrome/browser/extensions/display_info_provider_chromeos.h View 1 2 3 1 chunk +31 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/display_info_provider_chromeos.cc View 1 2 11 chunks +42 lines, -40 lines 0 comments Download
A + chrome/browser/extensions/display_info_provider_chromeos_unittest.cc View 1 2 33 chunks +89 lines, -91 lines 0 comments Download
A chrome/browser/extensions/display_info_provider_mac.h View 1 2 3 1 chunk +31 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/display_info_provider_mac.cc View 1 2 3 1 chunk +16 lines, -4 lines 0 comments Download
A chrome/browser/extensions/display_info_provider_win.h View 1 2 3 1 chunk +31 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/display_info_provider_win.cc View 1 2 6 chunks +22 lines, -11 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 2 chunks +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
tmpsantos
6 years, 4 months ago (2014-08-15 15:41:51 UTC) #1
tmpsantos
This patch relates to https://codereview.chromium.org/389633002 I'm isolating the DisplayInfoProvider implementation to not pull the ash/ ...
6 years, 4 months ago (2014-08-15 15:46:19 UTC) #2
James Cook
Thanks for taking on this refactoring! This per-platform subclassing pattern is unusual in the code ...
6 years, 4 months ago (2014-08-15 19:58:42 UTC) #3
tmpsantos
On 2014/08/15 19:58:42, James Cook wrote: > Thanks for taking on this refactoring! > > ...
6 years, 4 months ago (2014-08-19 21:33:09 UTC) #4
James Cook
Looking good. A few nits. https://codereview.chromium.org/476103002/diff/80001/chrome/browser/extensions/api/system_display/display_info_provider.cc File chrome/browser/extensions/api/system_display/display_info_provider.cc (right): https://codereview.chromium.org/476103002/diff/80001/chrome/browser/extensions/api/system_display/display_info_provider.cc#newcode16 chrome/browser/extensions/api/system_display/display_info_provider.cc:16: DisplayInfoProvider* g_display_info_provider = NULL; ...
6 years, 4 months ago (2014-08-19 21:48:52 UTC) #5
tmpsantos
https://codereview.chromium.org/476103002/diff/80001/chrome/browser/extensions/display_info_provider_aura.h File chrome/browser/extensions/display_info_provider_aura.h (right): https://codereview.chromium.org/476103002/diff/80001/chrome/browser/extensions/display_info_provider_aura.h#newcode19 chrome/browser/extensions/display_info_provider_aura.h:19: virtual bool SetInfo(const std::string& display_id, On 2014/08/19 21:48:51, James ...
6 years, 4 months ago (2014-08-20 18:58:32 UTC) #6
Lei Zhang
lgtm assuming James approves. https://codereview.chromium.org/476103002/diff/120001/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc File chrome/browser/extensions/display_info_provider_chromeos_unittest.cc (right): https://codereview.chromium.org/476103002/diff/120001/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc#newcode56 chrome/browser/extensions/display_info_provider_chromeos_unittest.cc:56: return base::StringPrintf( Just use Insets::ToString() ...
6 years, 4 months ago (2014-08-20 19:51:20 UTC) #7
James Cook
LGTM. Thanks again for refactoring this! https://codereview.chromium.org/476103002/diff/120001/chrome/browser/extensions/api/system_display/display_info_provider.cc File chrome/browser/extensions/api/system_display/display_info_provider.cc (right): https://codereview.chromium.org/476103002/diff/120001/chrome/browser/extensions/api/system_display/display_info_provider.cc#newcode16 chrome/browser/extensions/api/system_display/display_info_provider.cc:16: DisplayInfoProvider* g_display_info_provider = ...
6 years, 4 months ago (2014-08-20 19:57:59 UTC) #8
tmpsantos
Thanks all for reviewing. Patch rebased and I will cq+ as soon as the bots ...
6 years, 4 months ago (2014-08-21 13:31:56 UTC) #9
tmpsantos
The CQ bit was checked by thiago.santos@intel.com
6 years, 4 months ago (2014-08-21 18:34:36 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thiago.santos@intel.com/476103002/140001
6 years, 4 months ago (2014-08-21 18:38:26 UTC) #11
commit-bot: I haz the power
6 years, 4 months ago (2014-08-21 23:49:03 UTC) #12
Message was sent while issue was closed.
Committed patchset #5 (140001) as 291250

Powered by Google App Engine
This is Rietveld 408576698