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

Issue 15255004: Refactor of BrowserDistribution. (Closed)

Created:
7 years, 7 months ago by calamity
Modified:
7 years, 4 months ago
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina, sail+watch_chromium.org, grt+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Refactor of BrowserDistribution. This is a precursor to https://codereview.chromium.org/13864015/. * Added GetStartMenuShortcutSubfolder, which returns the Start Menu subfolder path for a given subfolder. * GetShortcutName and GetIconIndex now return data specific to a type of shortcut (browser, alternate name of browser, or app launcher). * GetDisplayName is now used rather than GetAppShortcutName where a localized name is needed (e.g., in logs and the registry). BUG=233434, 238895, 161985 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=217469

Patch Set 1 #

Total comments: 48

Patch Set 2 : rework #

Total comments: 32

Patch Set 3 : rework #

Total comments: 37

Patch Set 4 : rework #

Total comments: 19

Patch Set 5 : rework #

Total comments: 71

Patch Set 6 : rework #

Total comments: 8

Patch Set 7 : rework #

Patch Set 8 : oops, missed one #

Patch Set 9 : rebase #

Patch Set 10 : fix unit test #

Total comments: 9

Patch Set 11 : fix install.cc and install_unittest.cc #

Patch Set 12 : rework #

Patch Set 13 : rebase #

Patch Set 14 : #

Patch Set 15 : rebase #

Patch Set 16 : rebase #

Patch Set 17 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+344 lines, -215 lines) Patch
M chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +14 lines, -7 lines 0 comments Download
M chrome/browser/profiles/profile_shortcut_manager_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/shell_integration.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/shell_integration_win.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -15 lines 0 comments Download
M chrome/browser/ui/views/app_list/app_list_controller_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/installer/setup/install.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +10 lines, -5 lines 0 comments Download
M chrome/installer/setup/install_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +11 lines, -4 lines 0 comments Download
M chrome/installer/setup/install_worker.cc View 1 2 3 4 5 6 7 8 9 chunks +16 lines, -16 lines 0 comments Download
M chrome/installer/setup/setup_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +10 lines, -10 lines 0 comments Download
M chrome/installer/setup/setup_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/installer/setup/uninstall.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/installer/util/browser_distribution.h View 1 2 3 4 5 3 chunks +28 lines, -10 lines 0 comments Download
M chrome/installer/util/browser_distribution.cc View 1 2 3 4 5 6 7 3 chunks +37 lines, -14 lines 0 comments Download
M chrome/installer/util/chrome_app_host_distribution.h View 1 2 3 4 5 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/installer/util/chrome_app_host_distribution.cc View 1 2 3 4 5 1 chunk +6 lines, -8 lines 0 comments Download
M chrome/installer/util/chrome_app_host_operations.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/installer/util/chrome_browser_operations.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M chrome/installer/util/chrome_frame_distribution.h View 1 2 3 4 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/installer/util/chrome_frame_distribution.cc View 1 2 3 4 5 2 chunks +17 lines, -12 lines 0 comments Download
M chrome/installer/util/chromium_binaries_distribution.h View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/installer/util/chromium_binaries_distribution.cc View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/installer/util/google_chrome_binaries_distribution.h View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M chrome/installer/util/google_chrome_binaries_distribution.cc View 1 2 3 4 1 chunk +7 lines, -1 line 0 comments Download
M chrome/installer/util/google_chrome_distribution.h View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/installer/util/google_chrome_distribution.cc View 1 2 3 4 5 6 2 chunks +23 lines, -8 lines 0 comments Download
M chrome/installer/util/google_chrome_distribution_dummy.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/installer/util/google_chrome_sxs_distribution.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/installer/util/google_chrome_sxs_distribution.cc View 1 2 3 4 5 6 3 chunks +23 lines, -5 lines 0 comments Download
M chrome/installer/util/install_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/installer/util/installation_validator.cc View 1 2 3 10 chunks +13 lines, -13 lines 0 comments Download
M chrome/installer/util/installer_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/installer/util/prebuild/create_string_rc.py View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/installer/util/product.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M chrome/installer/util/shell_util.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/installer/util/shell_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +26 lines, -14 lines 0 comments Download
M chrome/installer/util/shell_util_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 12 chunks +39 lines, -15 lines 0 comments Download

Messages

Total messages: 42 (0 generated)
calamity
7 years, 7 months ago (2013-05-17 07:20:46 UTC) #1
gab
A quick review. FYI, Monday is a holiday in Canada. Cheers, Gab https://codereview.chromium.org/15255004/diff/1/chrome/browser/shell_integration_win.cc File chrome/browser/shell_integration_win.cc ...
7 years, 7 months ago (2013-05-18 23:57:22 UTC) #2
huangs
https://chromiumcodereview.appspot.com/15255004/diff/1/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc File chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc (right): https://chromiumcodereview.appspot.com/15255004/diff/1/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc#newcode226 chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc:226: distribution->GetShortcutInfo(BrowserDistribution::SHORTCUT_CHROME) What happened to .name? https://chromiumcodereview.appspot.com/15255004/diff/1/chrome/installer/setup/install.cc File chrome/installer/setup/install.cc (right): ...
7 years, 7 months ago (2013-05-21 21:35:41 UTC) #3
gab
https://chromiumcodereview.appspot.com/15255004/diff/1/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc File chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc (right): https://chromiumcodereview.appspot.com/15255004/diff/1/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc#newcode226 chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc:226: distribution->GetShortcutInfo(BrowserDistribution::SHORTCUT_CHROME) This should be using the subfolder anyways. https://chromiumcodereview.appspot.com/15255004/diff/1/chrome/installer/setup/install.cc ...
7 years, 7 months ago (2013-05-21 21:46:45 UTC) #4
calamity
https://chromiumcodereview.appspot.com/15255004/diff/1/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc File chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc (right): https://chromiumcodereview.appspot.com/15255004/diff/1/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc#newcode226 chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc:226: distribution->GetShortcutInfo(BrowserDistribution::SHORTCUT_CHROME) On 2013/05/21 21:46:45, gab wrote: > This should ...
7 years, 7 months ago (2013-05-24 02:03:11 UTC) #5
gab
Meta-comment: I hadn't realized how my assumption that "most of the time when we need ...
7 years, 7 months ago (2013-05-24 15:01:34 UTC) #6
grt (UTC plus 2)
https://chromiumcodereview.appspot.com/15255004/diff/33001/chrome/installer/util/browser_distribution.cc File chrome/installer/util/browser_distribution.cc (right): https://chromiumcodereview.appspot.com/15255004/diff/33001/chrome/installer/util/browser_distribution.cc#newcode174 chrome/installer/util/browser_distribution.cc:174: // TODO(calamity): Replace with a localized string. On 2013/05/24 ...
7 years, 6 months ago (2013-05-29 13:50:09 UTC) #7
calamity
https://chromiumcodereview.appspot.com/15255004/diff/33001/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc File chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc (right): https://chromiumcodereview.appspot.com/15255004/diff/33001/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc#newcode228 chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc:228: + installer::kLnkExt); On 2013/05/24 15:01:35, gab wrote: > '+' ...
7 years, 6 months ago (2013-05-31 00:11:18 UTC) #8
gab
Sorry for the long wait, I've been on vacation for 2.5 weeks, back now! Very ...
7 years, 6 months ago (2013-06-18 19:50:29 UTC) #9
calamity
https://chromiumcodereview.appspot.com/15255004/diff/64004/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc File chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc (right): https://chromiumcodereview.appspot.com/15255004/diff/64004/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc#newcode607 chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc:607: BrowserDistribution::SHORTCUT_CHROME)); On 2013/06/18 19:50:29, gab wrote: > Indent 4 ...
7 years, 5 months ago (2013-06-27 01:27:44 UTC) #10
gab
Very nice, almost there! Cheers! Gab PS: Next time please do separate patch sets for ...
7 years, 5 months ago (2013-06-27 11:49:43 UTC) #11
grt (UTC plus 2)
minuscule drive-by. please update the CL description so that it explains what is being changed ...
7 years, 5 months ago (2013-06-28 04:35:20 UTC) #12
calamity
Description updated. https://codereview.chromium.org/15255004/diff/64004/chrome/installer/util/google_chrome_sxs_distribution.cc File chrome/installer/util/google_chrome_sxs_distribution.cc (right): https://codereview.chromium.org/15255004/diff/64004/chrome/installer/util/google_chrome_sxs_distribution.cc#newcode38 chrome/installer/util/google_chrome_sxs_distribution.cc:38: return L"The Internet"; On 2013/06/27 11:49:43, gab ...
7 years, 5 months ago (2013-07-05 09:00:29 UTC) #13
gab
lgtm w/ changes below. Thanks a lot! Gab PS: Please wait for grt's review as ...
7 years, 5 months ago (2013-07-05 14:23:36 UTC) #14
grt (UTC plus 2)
It seems that ChromeAppHostDistribution has shortcut-related methods that should never be called now. This is ...
7 years, 5 months ago (2013-07-05 17:27:37 UTC) #15
gab
Greg brings up a lot of good points (thanks!). I agree that we need a ...
7 years, 5 months ago (2013-07-08 12:59:01 UTC) #16
grt (UTC plus 2)
https://codereview.chromium.org/15255004/diff/129004/chrome/installer/util/browser_distribution.h File chrome/installer/util/browser_distribution.h (right): https://codereview.chromium.org/15255004/diff/129004/chrome/installer/util/browser_distribution.h#newcode82 chrome/installer/util/browser_distribution.h:82: // |subfolder_type| that this distribution should create shortcuts in. ...
7 years, 5 months ago (2013-07-08 15:15:49 UTC) #17
gab
@huangs, see discussion below. https://codereview.chromium.org/15255004/diff/129004/chrome/installer/util/chrome_app_host_distribution.cc File chrome/installer/util/chrome_app_host_distribution.cc (right): https://codereview.chromium.org/15255004/diff/129004/chrome/installer/util/chrome_app_host_distribution.cc#newcode137 chrome/installer/util/chrome_app_host_distribution.cc:137: return installer::kChromeAppHostExe; On 2013/07/08 15:15:50, ...
7 years, 5 months ago (2013-07-08 15:22:40 UTC) #18
huangs
https://codereview.chromium.org/15255004/diff/129004/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc File chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc (right): https://codereview.chromium.org/15255004/diff/129004/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc#newcode216 chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc:216: BrowserDistribution* distribution = GetDistribution(); If you want, you may ...
7 years, 5 months ago (2013-07-08 19:43:56 UTC) #19
gab
https://codereview.chromium.org/15255004/diff/129004/chrome/installer/util/browser_distribution.h File chrome/installer/util/browser_distribution.h (right): https://codereview.chromium.org/15255004/diff/129004/chrome/installer/util/browser_distribution.h#newcode34 chrome/installer/util/browser_distribution.h:34: SHORTCUT_ALTERNATE_CHROME, On 2013/07/08 19:43:57, huangs1 wrote: > (Optional) please ...
7 years, 5 months ago (2013-07-08 20:20:32 UTC) #20
huangs
https://codereview.chromium.org/15255004/diff/129004/chrome/installer/util/browser_distribution.h File chrome/installer/util/browser_distribution.h (right): https://codereview.chromium.org/15255004/diff/129004/chrome/installer/util/browser_distribution.h#newcode34 chrome/installer/util/browser_distribution.h:34: SHORTCUT_ALTERNATE_CHROME, Sounds good.
7 years, 5 months ago (2013-07-09 15:02:52 UTC) #21
calamity
https://chromiumcodereview.appspot.com/15255004/diff/129004/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc File chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc (right): https://chromiumcodereview.appspot.com/15255004/diff/129004/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc#newcode216 chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc:216: BrowserDistribution* distribution = GetDistribution(); On 2013/07/08 19:43:57, huangs1 wrote: ...
7 years, 5 months ago (2013-07-16 04:05:17 UTC) #22
grt (UTC plus 2)
looking good. almost there. https://chromiumcodereview.appspot.com/15255004/diff/129004/chrome/installer/util/browser_distribution.cc File chrome/installer/util/browser_distribution.cc (right): https://chromiumcodereview.appspot.com/15255004/diff/129004/chrome/installer/util/browser_distribution.cc#newcode165 chrome/installer/util/browser_distribution.cc:165: switch (shortcut_type) { On 2013/07/16 ...
7 years, 5 months ago (2013-07-16 19:38:43 UTC) #23
calamity
https://chromiumcodereview.appspot.com/15255004/diff/155001/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): https://chromiumcodereview.appspot.com/15255004/diff/155001/chrome/installer/setup/install_worker.cc#newcode1512 chrome/installer/setup/install_worker.cc:1512: InstallUtil::GetActiveSetupPath(dist)); On 2013/07/16 19:38:44, grt wrote: > nit: unwrap ...
7 years, 5 months ago (2013-07-18 07:56:14 UTC) #24
grt (UTC plus 2)
lgtm with change below to make BrowserDistribution::GetIconFilename() return installer::kChromeExe. https://chromiumcodereview.appspot.com/15255004/diff/129004/chrome/installer/util/browser_distribution.cc File chrome/installer/util/browser_distribution.cc (right): https://chromiumcodereview.appspot.com/15255004/diff/129004/chrome/installer/util/browser_distribution.cc#newcode256 chrome/installer/util/browser_distribution.cc:256: ...
7 years, 5 months ago (2013-07-18 17:43:42 UTC) #25
calamity
+sky for chrome/browser/profiles, chrome/browser/shell_integration.h and chrome/browser/ui/views/app_list/app_list_controller_win.cc These files just use functions affected by this refactor. ...
7 years, 5 months ago (2013-07-19 04:05:18 UTC) #26
sky
Said files LGTM
7 years, 5 months ago (2013-07-19 15:47:18 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calamity@chromium.org/15255004/197001
7 years, 5 months ago (2013-07-22 06:13:10 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calamity@chromium.org/15255004/197001
7 years, 5 months ago (2013-07-22 06:14:54 UTC) #29
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 5 months ago (2013-07-22 07:27:43 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calamity@chromium.org/15255004/216001
7 years, 5 months ago (2013-07-22 08:16:13 UTC) #31
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 5 months ago (2013-07-22 09:16:43 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calamity@chromium.org/15255004/233001
7 years, 5 months ago (2013-07-22 10:25:23 UTC) #33
gab
A few nits in your latest patchsets -- some calls should use GetSubFolder instead of ...
7 years, 5 months ago (2013-07-22 16:09:13 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calamity@chromium.org/15255004/248001
7 years, 5 months ago (2013-07-23 06:33:27 UTC) #35
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 5 months ago (2013-07-23 08:00:52 UTC) #36
gab
On 2013/07/23 08:00:52, I haz the power (commit-bot) wrote: > Sorry for I got bad ...
7 years, 4 months ago (2013-08-12 16:38:15 UTC) #37
calamity
https://codereview.chromium.org/15255004/diff/197001/chrome/installer/util/shell_util_unittest.cc File chrome/installer/util/shell_util_unittest.cc (right): https://codereview.chromium.org/15255004/diff/197001/chrome/installer/util/shell_util_unittest.cc#newcode104 chrome/installer/util/shell_util_unittest.cc:104: dist_->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME)); On 2013/07/22 16:09:14, gab wrote: > This should ...
7 years, 4 months ago (2013-08-13 10:29:07 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calamity@chromium.org/15255004/301001
7 years, 4 months ago (2013-08-13 10:29:22 UTC) #39
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) nacl_integration http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=159262
7 years, 4 months ago (2013-08-13 11:45:12 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calamity@chromium.org/15255004/328001
7 years, 4 months ago (2013-08-14 00:51:10 UTC) #41
commit-bot: I haz the power
7 years, 4 months ago (2013-08-14 04:22:16 UTC) #42
Message was sent while issue was closed.
Change committed as 217469

Powered by Google App Engine
This is Rietveld 408576698