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

Unified Diff: chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc

Issue 2079233004: Add the Windows.IsPinnedToTaskbar metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Constexpr TimeDelta Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/shell_integration_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
index 281945d5632b740b9d39d69e3894c66a87a1cf74..b1af95d46c49e1f16df919098bf4be74ca4560cc 100644
--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
+++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
@@ -52,6 +52,7 @@
#if defined(OS_WIN)
#include "base/win/windows_version.h"
+#include "chrome/browser/shell_integration_win.h"
#include "chrome/installer/util/google_update_settings.h"
#endif // defined(OS_WIN)
@@ -349,11 +350,17 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserStart() {
RecordMacMetrics();
#endif // defined(OS_MACOSX)
- const int kStartupMetricsGatheringDelaySeconds = 45;
+ constexpr base::TimeDelta kStartupMetricsGatheringDelay =
+ base::TimeDelta::FromSeconds(45);
content::BrowserThread::GetBlockingPool()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&RecordStartupMetricsOnBlockingPool),
- base::TimeDelta::FromSeconds(kStartupMetricsGatheringDelaySeconds));
+ FROM_HERE, base::Bind(&RecordStartupMetricsOnBlockingPool),
+ kStartupMetricsGatheringDelay);
+#if defined(OS_WIN)
+ content::BrowserThread::PostDelayedTask(
+ content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&shell_integration::win::RecordIsPinnedToTaskbarHistogram),
+ kStartupMetricsGatheringDelay);
+#endif // defined(OS_WIN)
display_count_ = display::Screen::GetScreen()->GetNumDisplays();
UMA_HISTOGRAM_COUNTS_100("Hardware.Display.Count.OnStartup", display_count_);
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/shell_integration_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698