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

Side by Side Diff: chrome/browser/ui/tab_helpers.cc

Issue 2142983002: Add desktop engagement metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/tab_helpers.h" 5 #include "chrome/browser/ui/tab_helpers.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/content_settings/chrome_content_settings_client.h" 10 #include "chrome/browser/content_settings/chrome_content_settings_client.h"
11 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 11 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
12 #include "chrome/browser/engagement/site_engagement_helper.h" 12 #include "chrome/browser/engagement/site_engagement_helper.h"
13 #include "chrome/browser/engagement/site_engagement_service.h" 13 #include "chrome/browser/engagement/site_engagement_service.h"
14 #include "chrome/browser/external_protocol/external_protocol_observer.h" 14 #include "chrome/browser/external_protocol/external_protocol_observer.h"
15 #include "chrome/browser/favicon/favicon_utils.h" 15 #include "chrome/browser/favicon/favicon_utils.h"
16 #include "chrome/browser/history/history_tab_helper.h" 16 #include "chrome/browser/history/history_tab_helper.h"
17 #include "chrome/browser/history/top_sites_factory.h" 17 #include "chrome/browser/history/top_sites_factory.h"
18 #include "chrome/browser/infobars/infobar_service.h" 18 #include "chrome/browser/infobars/infobar_service.h"
19 #include "chrome/browser/metrics/desktop_engagement_observer.h"
19 #include "chrome/browser/net/net_error_tab_helper.h" 20 #include "chrome/browser/net/net_error_tab_helper.h"
20 #include "chrome/browser/net/predictor_tab_helper.h" 21 #include "chrome/browser/net/predictor_tab_helper.h"
21 #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" 22 #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h"
22 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 23 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
23 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h" 24 #include "chrome/browser/predictors/resource_prefetch_predictor_factory.h"
24 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h" 25 #include "chrome/browser/predictors/resource_prefetch_predictor_tab_helper.h"
25 #include "chrome/browser/prerender/prerender_tab_helper.h" 26 #include "chrome/browser/prerender/prerender_tab_helper.h"
26 #include "chrome/browser/profiles/profile.h" 27 #include "chrome/browser/profiles/profile.h"
27 #include "chrome/browser/sessions/session_tab_helper.h" 28 #include "chrome/browser/sessions/session_tab_helper.h"
28 #include "chrome/browser/ssl/chrome_security_state_model_client.h" 29 #include "chrome/browser/ssl/chrome_security_state_model_client.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents); 209 safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents);
209 SearchEngineTabHelper::CreateForWebContents(web_contents); 210 SearchEngineTabHelper::CreateForWebContents(web_contents);
210 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents); 211 TabContentsSyncedTabDelegate::CreateForWebContents(web_contents);
211 TabDialogs::CreateForWebContents(web_contents); 212 TabDialogs::CreateForWebContents(web_contents);
212 ThumbnailTabHelper::CreateForWebContents(web_contents); 213 ThumbnailTabHelper::CreateForWebContents(web_contents);
213 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents); 214 web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents);
214 215
215 if (banners::AppBannerManagerDesktop::IsEnabled()) { 216 if (banners::AppBannerManagerDesktop::IsEnabled()) {
216 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents); 217 banners::AppBannerManagerDesktop::CreateForWebContents(web_contents);
217 } 218 }
219 DesktopEngagementObserver::CreateForWebContents(web_contents);
Avi (use Gerrit) 2016/07/13 18:40:58 Alphabetical order, plz?
gayane -on leave until 09-2017 2016/07/20 20:22:02 Done.
218 #endif 220 #endif
219 221
220 // --- Feature tab helpers behind flags --- 222 // --- Feature tab helpers behind flags ---
221 223
222 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 224 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
223 CaptivePortalTabHelper::CreateForWebContents(web_contents); 225 CaptivePortalTabHelper::CreateForWebContents(web_contents);
224 #endif 226 #endif
225 227
226 #if defined(ENABLE_EXTENSIONS) 228 #if defined(ENABLE_EXTENSIONS)
227 extensions::TabHelper::CreateForWebContents(web_contents); 229 extensions::TabHelper::CreateForWebContents(web_contents);
(...skipping 21 matching lines...) Expand all
249 251
250 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile( 252 if (predictors::ResourcePrefetchPredictorFactory::GetForProfile(
251 web_contents->GetBrowserContext())) { 253 web_contents->GetBrowserContext())) {
252 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents( 254 predictors::ResourcePrefetchPredictorTabHelper::CreateForWebContents(
253 web_contents); 255 web_contents);
254 } 256 }
255 257
256 if (tracing::NavigationTracingObserver::IsEnabled()) 258 if (tracing::NavigationTracingObserver::IsEnabled())
257 tracing::NavigationTracingObserver::CreateForWebContents(web_contents); 259 tracing::NavigationTracingObserver::CreateForWebContents(web_contents);
258 } 260 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698