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

Issue 2079233004: Add the Windows.IsPinnedToTaskbar metric. (Closed)

Created:
4 years, 6 months ago by Patrick Monette
Modified:
4 years, 5 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, asvitkine+watch_chromium.org, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add the Windows.IsPinnedToTaskbar metric. This metric records the taskbar pinned state of Chrome for the current user. Because the code loads shell extensions into the process, this is done on a utility process. BUG=621662 Committed: https://crrev.com/5057ca3b14b295bfb632538ab4e7e681790e5d9b Cr-Commit-Position: refs/heads/master@{#403695}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Grt's comments #

Total comments: 22

Patch Set 3 : Gab comments #

Total comments: 12

Patch Set 4 : asvitkine comments #

Total comments: 6

Patch Set 5 : Small nits #

Total comments: 1

Patch Set 6 : Renamed ShellHandler to IPCShellHandler #

Patch Set 7 : Fix compilation #

Total comments: 4

Patch Set 8 : Constexpr TimeDelta #

Unified diffs Side-by-side diffs Delta from patch set Stats (+437 lines, -191 lines) Patch
M base/base_paths_win.h View 1 chunk +19 lines, -17 lines 0 comments Download
M base/base_paths_win.cc View 1 chunk +8 lines, -2 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc View 1 2 3 4 5 6 7 2 chunks +11 lines, -4 lines 0 comments Download
M chrome/browser/shell_integration_win.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/shell_integration_win.cc View 1 2 3 4 chunks +58 lines, -0 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_utility.gypi View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/common/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/OWNERS View 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/common/shell_handler_win.mojom View 1 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/utility/DEPS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/utility/chrome_content_utility_client.cc View 1 2 3 4 5 3 chunks +6 lines, -2 lines 0 comments Download
A + chrome/utility/ipc_shell_handler_win.h View 1 2 3 4 5 2 chunks +15 lines, -13 lines 0 comments Download
A + chrome/utility/ipc_shell_handler_win.cc View 1 2 3 4 5 3 chunks +13 lines, -16 lines 0 comments Download
A chrome/utility/shell_handler_impl_win.h View 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/utility/shell_handler_impl_win.cc View 1 2 3 4 1 chunk +224 lines, -0 lines 0 comments Download
D chrome/utility/shell_handler_win.h View 1 2 3 4 5 1 chunk +0 lines, -51 lines 0 comments Download
D chrome/utility/shell_handler_win.cc View 1 2 3 4 5 1 chunk +0 lines, -84 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 2 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (21 generated)
Patrick Monette
grt@ shell_integration_win. mark@ base/ sky@ everything else under chrome/ ___chrome_browser_main_extra_parts_metrics.cc ___chrome/common/ ___chrome/utility/ PTAL.
4 years, 6 months ago (2016-06-21 15:25:18 UTC) #7
Mark Mentovai
LGTM in base
4 years, 6 months ago (2016-06-21 16:07:32 UTC) #8
grt (UTC plus 2)
https://codereview.chromium.org/2079233004/diff/60001/chrome/app/chromium_strings.grd File chrome/app/chromium_strings.grd (right): https://codereview.chromium.org/2079233004/diff/60001/chrome/app/chromium_strings.grd#newcode1218 chrome/app/chromium_strings.grd:1218: Shell Handler since this string doesn't contain the product ...
4 years, 6 months ago (2016-06-22 13:58:50 UTC) #9
Patrick Monette
Hey gab@, can you PTAL while grt@ is OOO? https://codereview.chromium.org/2079233004/diff/60001/chrome/app/chromium_strings.grd File chrome/app/chromium_strings.grd (right): https://codereview.chromium.org/2079233004/diff/60001/chrome/app/chromium_strings.grd#newcode1218 chrome/app/chromium_strings.grd:1218: ...
4 years, 6 months ago (2016-06-23 22:58:53 UTC) #12
gab
lg but I'm not clear on the whole mojo thing (i.e. why ShellHandler doesn't use ...
4 years, 5 months ago (2016-06-28 20:59:19 UTC) #13
Patrick Monette
Thanks gab, Another look? thakis@, I need owners review for chrome/common/ and chrome/utility. Can you ...
4 years, 5 months ago (2016-06-28 23:22:25 UTC) #15
Alexei Svitkine (slow)
https://codereview.chromium.org/2079233004/diff/120001/chrome/browser/shell_integration_win.cc File chrome/browser/shell_integration_win.cc (right): https://codereview.chromium.org/2079233004/diff/120001/chrome/browser/shell_integration_win.cc#newcode439 chrome/browser/shell_integration_win.cc:439: UMA_HISTOGRAM_BOOLEAN("Windows.IsPinnedToTaskbar.Succeeded", succeeded); I don't see why you need multiple ...
4 years, 5 months ago (2016-06-29 14:37:45 UTC) #16
Patrick Monette
https://codereview.chromium.org/2079233004/diff/120001/chrome/browser/shell_integration_win.cc File chrome/browser/shell_integration_win.cc (right): https://codereview.chromium.org/2079233004/diff/120001/chrome/browser/shell_integration_win.cc#newcode439 chrome/browser/shell_integration_win.cc:439: UMA_HISTOGRAM_BOOLEAN("Windows.IsPinnedToTaskbar.Succeeded", succeeded); On 2016/06/29 14:37:44, Alexei Svitkine (very slow) ...
4 years, 5 months ago (2016-06-29 18:28:42 UTC) #17
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/2079233004/diff/140001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2079233004/diff/140001/tools/metrics/histograms/histograms.xml#newcode64462 tools/metrics/histograms/histograms.xml:64462: + process. Nit: Mention that this is logged ...
4 years, 5 months ago (2016-06-29 18:32:03 UTC) #18
Nico
I'm not familiar with mojom stuff either; maybe someone who is should take a look ...
4 years, 5 months ago (2016-06-29 20:02:32 UTC) #19
Patrick Monette
Thanks Nico. I'll add someone familiar with Mojo. About tests.. I don't think it's needed. ...
4 years, 5 months ago (2016-06-29 21:14:54 UTC) #20
Patrick Monette
amistry@ Can you please take a look at the Mojo changes? files: shell_handler_win.mojom shell_integration_win.cc chrome_content_utility_client.cc ...
4 years, 5 months ago (2016-06-29 21:17:05 UTC) #22
Nico
lgtm once amistry likes it
4 years, 5 months ago (2016-06-29 23:42:54 UTC) #23
Anand Mistry (off Chromium)
lgtm
4 years, 5 months ago (2016-06-30 07:38:26 UTC) #24
gab
lgtm w/ rename of old ShellHandler and one more comment https://codereview.chromium.org/2079233004/diff/100001/chrome/utility/shell_handler_impl_win.cc File chrome/utility/shell_handler_impl_win.cc (right): https://codereview.chromium.org/2079233004/diff/100001/chrome/utility/shell_handler_impl_win.cc#newcode58 ...
4 years, 5 months ago (2016-06-30 15:28:11 UTC) #25
Patrick Monette
Thanks!
4 years, 5 months ago (2016-06-30 15:55:58 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2079233004/180001
4 years, 5 months ago (2016-06-30 15:56:19 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/210497)
4 years, 5 months ago (2016-06-30 16:03:45 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2079233004/200001
4 years, 5 months ago (2016-06-30 17:29:38 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/210602)
4 years, 5 months ago (2016-06-30 17:38:44 UTC) #36
Patrick Monette
dcheng@ Can you review shell_handler_win.mojom for IPC security?
4 years, 5 months ago (2016-06-30 17:52:35 UTC) #38
dcheng
mojom lgtm https://codereview.chromium.org/2079233004/diff/200001/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc File chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc (right): https://codereview.chromium.org/2079233004/diff/200001/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc#newcode362 chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc:362: base::TimeDelta::FromSeconds(kStartupMetricsGatheringDelaySeconds)); Nit: I think kStartupMetricsGatheringDelaySeconds can just ...
4 years, 5 months ago (2016-07-01 05:46:56 UTC) #39
Patrick Monette
Thanks! https://codereview.chromium.org/2079233004/diff/200001/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc File chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc (right): https://codereview.chromium.org/2079233004/diff/200001/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc#newcode362 chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc:362: base::TimeDelta::FromSeconds(kStartupMetricsGatheringDelaySeconds)); On 2016/07/01 05:46:55, dcheng wrote: > Nit: ...
4 years, 5 months ago (2016-07-04 15:36:15 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2079233004/220001
4 years, 5 months ago (2016-07-04 15:36:53 UTC) #43
commit-bot: I haz the power
Committed patchset #8 (id:220001)
4 years, 5 months ago (2016-07-04 16:48:57 UTC) #45
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-04 16:49:02 UTC) #46
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/5057ca3b14b295bfb632538ab4e7e681790e5d9b Cr-Commit-Position: refs/heads/master@{#403695}
4 years, 5 months ago (2016-07-04 16:51:10 UTC) #48
grt (UTC plus 2)
4 years, 5 months ago (2016-07-14 07:39:35 UTC) #49
Message was sent while issue was closed.
post-commit fyi

https://codereview.chromium.org/2079233004/diff/60001/chrome/utility/shell_ha...
File chrome/utility/shell_handler_impl_win.cc (right):

https://codereview.chromium.org/2079233004/diff/60001/chrome/utility/shell_ha...
chrome/utility/shell_handler_impl_win.cc:26: base::ScopedNativeLibrary
scoped_native_library(
On 2016/06/23 22:58:53, Patrick Monette wrote:
> On 2016/06/22 13:58:50, grt (no reviews Jun 23-Jul 11) wrote:
> > is it possible to load it as a data file (LOAD_LIBRARY_AS_DATAFILE |
> > LOAD_LIBRARY_AS_IMAGE_RESOURCE) since no functions are used? this may be
more
> > efficient; see msdn for more:
> > https://msdn.microsoft.com/library/windows/desktop/ms684179.aspx.
> 
> Done. I am not sure of the difference between LOAD_LIBRARY_AS_DATAFILE and
> LOAD_LIBRARY_AS_IMAGE_RESOURCE, but it works if I only specify the former.

Apologies for not being more clear: my suggestion was to use the two flags
together as per MSDN: "Unless an application depends on specific image mapping
characteristics, the LOAD_LIBRARY_AS_IMAGE_RESOURCE value should be used with
either LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE or LOAD_LIBRARY_AS_DATAFILE." Also
"When the LOAD_LIBRARY_AS_IMAGE_RESOURCE value is used...resources can be more
quickly retrieved from the module." The performance is a non-issue since only
one resource is read, but I think it makes sense to follow the recommendation
anyway.

Powered by Google App Engine
This is Rietveld 408576698