diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php
index 49b56ead743e3dc9368b6cfe7e0d0e146126fac2..abee150c570b6530045e4adcb33ad5a0ac140e6d 100644
--- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php
+++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php
@@ -3,7 +3,9 @@
 namespace Drupal\language\Plugin\LanguageNegotiation;
 
 use Drupal\Component\Utility\UserAgent;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\language\LanguageNegotiationMethodBase;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\Request;
 
 /**
@@ -17,13 +19,29 @@
  *   config_route_name = "language.negotiation_browser"
  * )
  */
-class LanguageNegotiationBrowser extends LanguageNegotiationMethodBase {
+class LanguageNegotiationBrowser extends LanguageNegotiationMethodBase implements ContainerFactoryPluginInterface {
 
   /**
    * The language negotiation method id.
    */
   const METHOD_ID = 'language-browser';
 
+  /**
+   * The page cache disabling policy.
+   *
+   * @var \Drupal\Core\PageCache\ResponsePolicy\KillSwitch
+   */
+  protected $pageCacheKillSwitch;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
+    $instance = new static();
+    $instance->pageCacheKillSwitch = $container->get('page_cache_kill_switch');
+    return $instance;
+  }
+
   /**
    * {@inheritdoc}
    */
@@ -41,7 +59,7 @@ public function getLangcode(Request $request = NULL) {
     // could lead to wrong cached sites. Therefore disabling the internal page
     // cache.
     // @todo Solve more elegantly in https://www.drupal.org/node/2430335.
-    \Drupal::service('page_cache_kill_switch')->trigger();
+    $this->pageCacheKillSwitch->trigger();
 
     return $langcode;
   }