diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 564f9d5..fe04aee 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1354,7 +1354,7 @@ function template_preprocess_html(&$variables) {
   }
   // @todo Remove once views is not bypassing the view subscriber anymore.
   //   @see http://drupal.org/node/2068471
-  elseif (drupal_is_front_page()) {
+  if (\Drupal::service('path.matcher')->isFrontPage()) {
     $head_title = array(
       'title' => t('Home'),
       'name' => String::checkPlain($site_config->get('name')),
@@ -1533,7 +1533,7 @@ function theme_get_suggestions($args, $base, $delimiter = '__') {
       $prefix .= $delimiter . $arg;
     }
   }
-  if (drupal_is_front_page()) {
+  if (\Drupal::service('path.matcher')->isFrontPage()) {
     // Front templates should be based on root only, not prefixed arguments.
     $suggestions[] = $base . $delimiter . 'front';
   }
diff --git a/core/modules/language/src/Plugin/Block/LanguageBlock.php b/core/modules/language/src/Plugin/Block/LanguageBlock.php
index 0502d2d..bafd8be 100644
--- a/core/modules/language/src/Plugin/Block/LanguageBlock.php
+++ b/core/modules/language/src/Plugin/Block/LanguageBlock.php
@@ -8,6 +8,7 @@
 namespace Drupal\language\Plugin\Block;
 
 use Drupal\Core\Block\BlockBase;
+use Drupal\Core\Path\PathMatcher;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\Language\LanguageManagerInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@@ -34,6 +35,13 @@ class LanguageBlock extends BlockBase implements ContainerFactoryPluginInterface
   protected $languageManager;
 
   /**
+   * The path matcher.
+   *
+   * @var \Drupal\Core\Path\PathMatcher
+   */
+  protected $pathMatcher;
+
+  /**
    * Constructs an LanguageBlock object.
    *
    * @param array $configuration
@@ -44,10 +52,13 @@ class LanguageBlock extends BlockBase implements ContainerFactoryPluginInterface
    *   The plugin implementation definition.
    * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
    *   The language manager.
+   * @param \Drupal\Core\Path\PathMatcher $path_matcher
+   * The path matcher.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, LanguageManagerInterface $language_manager) {
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, LanguageManagerInterface $language_manager, PathMatcher $path_matcher) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->languageManager = $language_manager;
+    $this->pathMatcher = $path_matcher;
   }
 
 
@@ -59,7 +70,8 @@ public static function create(ContainerInterface $container, array $configuratio
       $configuration,
       $plugin_id,
       $plugin_definition,
-      $container->get('language_manager')
+      $container->get('language_manager'),
+      $container->get('path.matcher')
     );
   }
 
@@ -76,7 +88,7 @@ protected function blockAccess(AccountInterface $account) {
    */
   public function build() {
     $build = array();
-    $route_name = drupal_is_front_page() ? '<front>' : '<current>';
+    $route_name = $this->pathMatcher->isFrontPage() ? '<front>' : '<current>';
     $type = $this->getDerivativeId();
     $links = $this->languageManager->getLanguageSwitchLinks($type, Url::fromRoute($route_name));
 
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index c1e4d5b..5ee5f60 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -266,7 +266,7 @@ function system_theme_suggestions_maintenance_page(array $variables) {
   // allow themers to override the page and the content completely.
   $offline = defined('MAINTENANCE_MODE');
   try {
-    drupal_is_front_page();
+    \Drupal::service('path.matcher')->isFrontPage();
   }
   catch (Exception $e) {
     // The database is not yet available.
@@ -608,7 +608,7 @@ function system_page_attachments(array &$page) {
       // Collect the current state that determines whether a link is active.
       array(
         'path' => \Drupal::routeMatch()->getRouteName() ? Url::fromRouteMatch(\Drupal::routeMatch())->getInternalPath() : '',
-        'front' => drupal_is_front_page(),
+        'front' => \Drupal::service('path.matcher')->isFrontPage(),
         'language' => \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_URL)->getId(),
         'query' => \Drupal::request()->query->all(),
       )
@@ -640,7 +640,7 @@ function system_js_settings_alter(&$settings) {
     'pathPrefix' => $pathPrefix,
     'currentPath' => $current_path,
     'currentPathIsAdmin' => $current_path_is_admin,
-    'isFront' => drupal_is_front_page(),
+    'isFront' => \Drupal::service('path.matcher')->isFrontPage(),
     'currentLanguage' => \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_URL)->getId(),
   ];
   if (!empty($current_query)) {
diff --git a/core/modules/system/tests/modules/system_test/system_test.module b/core/modules/system/tests/modules/system_test/system_test.module
index b44e0a0..a2ed30b 100644
--- a/core/modules/system/tests/modules/system_test/system_test.module
+++ b/core/modules/system/tests/modules/system_test/system_test.module
@@ -99,9 +99,10 @@ function system_test_lock_exit() {
  * Implements hook_page_attachments().
  */
 function system_test_page_attachments(array &$page) {
-  // Used by FrontPageTestCase to get the results of drupal_is_front_page().
+  // Used by FrontPageTestCase to get the results of
+  // \Drupal\Core\Path\PathMatcherInterface->isFrontPage().
   $frontpage = \Drupal::state()->get('system_test.front_page_output') ?: 0;
-  if ($frontpage && drupal_is_front_page()) {
+  if ($frontpage && \Drupal::service('path.matcher')->isFrontPage()) {
     drupal_set_message(t('On front page.'));
   }
 }
