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

Unified Diff: chrome/browser/ui/tab_helpers.cc

Issue 2790943002: Alphabetize the tab helpers. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/tab_helpers.cc
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
index 49f938d259202245c4ab4bc69ec69466e8f424d1..075c1cb2a603dccbbd39994a9548fcf09d91f32a 100644
--- a/chrome/browser/ui/tab_helpers.cc
+++ b/chrome/browser/ui/tab_helpers.cc
@@ -150,6 +150,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
// SessionTabHelper comes first because it sets up the tab ID, and other
// helpers may rely on that.
SessionTabHelper::CreateForWebContents(web_contents);
+
#if !defined(OS_ANDROID)
// ZoomController comes before common tab helpers since ChromeAutofillClient
// may want to register as a ZoomObserver with it.
@@ -185,6 +186,10 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
web_contents->GetBrowserContext())).get());
HistoryTabHelper::CreateForWebContents(web_contents);
InfoBarService::CreateForWebContents(web_contents);
+ metrics::RendererUptimeWebContentsObserver::CreateForWebContents(
+ web_contents);
+ if (content::IsBrowserSideNavigationEnabled())
+ MixedContentSettingsTabHelper::CreateForWebContents(web_contents);
NavigationCorrectionTabObserver::CreateForWebContents(web_contents);
NavigationMetricsRecorder::CreateForWebContents(web_contents);
chrome::InitializePageLoadMetricsForWebContents(web_contents);
@@ -209,10 +214,9 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
// TODO(vabr): Remove TabSpecificContentSettings from here once their function
// is taken over by ChromeContentSettingsClient. http://crbug.com/387075
TabSpecificContentSettings::CreateForWebContents(web_contents);
- if (content::IsBrowserSideNavigationEnabled())
- MixedContentSettingsTabHelper::CreateForWebContents(web_contents);
- metrics::RendererUptimeWebContentsObserver::CreateForWebContents(
- web_contents);
+
+ // NO! Do not just add your tab helper here. This is a large alphabetized
+ // block; please insert your tab helper above in alphabetical order.
// --- Platform-specific tab helpers ---
@@ -257,6 +261,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
(defined(OS_LINUX) && !defined(OS_CHROMEOS))
metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents);
#endif
+
// --- Feature tab helpers behind flags ---
#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698