-
Notifications
You must be signed in to change notification settings - Fork 0
/
047.patch
35 lines (32 loc) · 1.73 KB
/
047.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- a/chrome/browser/ui/tab_helpers.cc 2017-10-04 18:07:36.000000000 -0400
+++ b/chrome/browser/ui/tab_helpers.cc 2017-10-08 20:19:27.136157525 -0400
@@ -207,13 +207,17 @@
HistoryTabHelper::CreateForWebContents(web_contents);
InfoBarService::CreateForWebContents(web_contents);
InstallableManager::CreateForWebContents(web_contents);
- metrics::RendererUptimeWebContentsObserver::CreateForWebContents(
- web_contents);
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics")) {
+ metrics::RendererUptimeWebContentsObserver::CreateForWebContents(
+ web_contents);
+ }
if (content::IsBrowserSideNavigationEnabled())
MixedContentSettingsTabHelper::CreateForWebContents(web_contents);
NavigationCorrectionTabObserver::CreateForWebContents(web_contents);
- NavigationMetricsRecorder::CreateForWebContents(web_contents);
- chrome::InitializePageLoadMetricsForWebContents(web_contents);
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics")) {
+ NavigationMetricsRecorder::CreateForWebContents(web_contents);
+ chrome::InitializePageLoadMetricsForWebContents(web_contents);
+ }
PDFPluginPlaceholderObserver::CreateForWebContents(web_contents);
PermissionRequestManager::CreateForWebContents(web_contents);
PopupBlockerTabHelper::CreateForWebContents(web_contents);
@@ -283,8 +287,8 @@
#if defined(OS_WIN) || defined(OS_MACOSX) || \
(defined(OS_LINUX) && !defined(OS_CHROMEOS))
- metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents);
-#endif
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics"))
+ metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents);#endif
// --- Feature tab helpers behind flags ---