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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2931023002: [TooManyTabs] Add TabNavigationThrottle (Closed)
Patch Set: add comments Created 3 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/browser/BUILD.gn ('k') | chrome/browser/resource_coordinator/background_tab_navigation_throttle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 9d061cb3fd76543097c1850d84746350aaa5fb9c..fd5fed88e8939a337e40ad1e9edfb4d9d1834a12 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -73,6 +73,7 @@
#include "chrome/browser/renderer_host/chrome_navigation_ui_data.h"
#include "chrome/browser/renderer_host/chrome_render_message_filter.h"
#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h"
+#include "chrome/browser/resource_coordinator/background_tab_navigation_throttle.h"
#include "chrome/browser/safe_browsing/browser_url_loader_throttle.h"
#include "chrome/browser/safe_browsing/certificate_reporting_service.h"
#include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h"
@@ -3243,6 +3244,16 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
&throttles);
}
+#if !defined(OS_ANDROID)
+ // BackgroundTabNavigationThrottle is used by TabManager, which is only
+ // enabled on non-Android platforms.
+ std::unique_ptr<content::NavigationThrottle>
+ background_tab_navigation_throttle = resource_coordinator::
+ BackgroundTabNavigationThrottle::MaybeCreateThrottleFor(handle);
+ if (background_tab_navigation_throttle)
+ throttles.push_back(std::move(background_tab_navigation_throttle));
+#endif
+
return throttles;
}
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/resource_coordinator/background_tab_navigation_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698