diff --git a/core/core.services.yml b/core/core.services.yml
index 465d145..4b27889 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -488,6 +488,9 @@ services:
       - { name: path_processor_inbound, priority: 100 }
       - { name: path_processor_outbound, priority: 300 }
     arguments: ['@path.alias_manager']
+  path_matcher:
+    class: Drupal\Core\Path\PathMatcher
+    arguments: ['@config.factory']
   transliteration:
     class: Drupal\Core\Transliteration\PHPTransliteration
   flood:
diff --git a/core/includes/path.inc b/core/includes/path.inc
index 9c41abd..dcf8ec0 100644
--- a/core/includes/path.inc
+++ b/core/includes/path.inc
@@ -31,34 +31,19 @@ function drupal_is_front_page() {
 /**
  * Check if a path matches any pattern in a set of patterns.
  *
- * @param $path
+ * @param string $path
  *   The path to match.
- * @param $patterns
+ * @param string $patterns
  *   String containing a set of patterns separated by \n, \r or \r\n.
  *
- * @return
+ * @return bool
  *   Boolean value: TRUE if the path matches a pattern, FALSE otherwise.
+ *
+ * @deprecated as of Drupal 8.0. Use
+ *   \Drupal\Core\Path\PathMatcherInterface::matchPath() instead.
  */
 function drupal_match_path($path, $patterns) {
-  $regexps = &drupal_static(__FUNCTION__);
-
-  if (!isset($regexps[$patterns])) {
-    // Convert path settings to a regular expression.
-    // Therefore replace newlines with a logical or, /* with asterisks and the <front> with the frontpage.
-    $to_replace = array(
-      '/(\r\n?|\n)/', // newlines
-      '/\\\\\*/',     // asterisks
-      '/(^|\|)\\\\<front\\\\>($|\|)/' // <front>
-    );
-    $replacements = array(
-      '|',
-      '.*',
-      '\1' . preg_quote(\Drupal::config('system.site')->get('page.front'), '/') . '\2'
-    );
-    $patterns_quoted = preg_quote($patterns, '/');
-    $regexps[$patterns] = '/^(' . preg_replace($to_replace, $replacements, $patterns_quoted) . ')$/';
-  }
-  return (bool)preg_match($regexps[$patterns], $path);
+  return \Drupal::service('path_matcher')->matchPath($path, $patterns);
 }
 
 /**
diff --git a/core/lib/Drupal/Core/Path/PathMatcher.php b/core/lib/Drupal/Core/Path/PathMatcher.php
new file mode 100644
index 0000000..62aecc8
--- /dev/null
+++ b/core/lib/Drupal/Core/Path/PathMatcher.php
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Path\PathMatcher.
+ */
+
+namespace Drupal\Core\Path;
+
+use Drupal\Core\Config\ConfigFactory;
+
+/**
+ * Provides a path matcher.
+ */
+class PathMatcher implements PathMatcherInterface {
+
+  /**
+   * The default front page.
+   *
+   * @var string
+   */
+  protected $frontPage;
+
+  /**
+   * The cache of regular expressions.
+   *
+   * @var array
+   */
+  protected $regexes;
+
+  /**
+   * Creates a new PathMatcher.
+   *
+   * @param \Drupal\Core\Config\ConfigFactory $config_factory
+   *   The config factory.
+   */
+  public function __construct(ConfigFactory $config_factory) {
+    $this->frontPage = $config_factory->get('system.site')->get('page.front');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function matchPath($path, $patterns) {
+    if (!isset($this->regexes[$patterns])) {
+      // Convert path settings to a regular expression.
+      // Therefore replace newlines with a logical or, /* with asterisks and the
+      // <front> with the frontpage.
+      $to_replace = array(
+        '/(\r\n?|\n)/', // newlines
+        '/\\\\\*/',     // asterisks
+        '/(^|\|)\\\\<front\\\\>($|\|)/', // <front>
+      );
+      $replacements = array(
+        '|',
+        '.*',
+        '\1' . preg_quote($this->frontPage, '/') . '\2',
+      );
+      $patterns_quoted = preg_quote($patterns, '/');
+      $this->regexes[$patterns] = '/^(' . preg_replace($to_replace, $replacements, $patterns_quoted) . ')$/';
+    }
+    return (bool) preg_match($this->regexes[$patterns], $path);
+  }
+}
diff --git a/core/lib/Drupal/Core/Path/PathMatcherInterface.php b/core/lib/Drupal/Core/Path/PathMatcherInterface.php
new file mode 100644
index 0000000..9acf45f
--- /dev/null
+++ b/core/lib/Drupal/Core/Path/PathMatcherInterface.php
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Path\PathMatcherInterface
+ */
+
+namespace Drupal\Core\Path;
+
+/**
+ * Interface for URL path matchers.
+ */
+interface PathMatcherInterface {
+
+  /**
+   * Checks if a path matches any pattern in a set of patterns.
+   *
+   * @param string $path
+   *   The path to match.
+   * @param string $patterns
+   *   String containing a set of patterns separated by \n, \r or \r\n.
+   *
+   * @return bool
+   *   TRUE if the path matches a pattern, FALSE otherwise.
+   */
+  public function matchPath($path, $patterns);
+
+}
diff --git a/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php b/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php
index 86f7529..862b21b 100644
--- a/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php
+++ b/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\Core\Plugin;
 
-use Drupal\Component\Plugin\ContextAwarePluginBase as PluginBase;
+use Drupal\Component\Plugin\ContextAwarePluginBase as ComponentContextAwarePluginBase;
 use Drupal\Component\Plugin\Exception\PluginException;
 use Drupal\Core\Plugin\Context\Context;
 use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
@@ -19,7 +19,7 @@
  * the Context class. This code is exactly the same as what is in Component
  * ContextAwarePluginBase but it is using a different Context class.
  */
-abstract class ContextAwarePluginBase extends PluginBase {
+abstract class ContextAwarePluginBase extends ComponentContextAwarePluginBase {
 
   /**
    * Override of \Drupal\Component\Plugin\ContextAwarePluginBase::__construct().
diff --git a/core/modules/system/lib/Drupal/system/Plugin/Core/Condition/RequestPath.php b/core/modules/system/lib/Drupal/system/Plugin/Core/Condition/RequestPath.php
new file mode 100644
index 0000000..fcc40a1
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Plugin/Core/Condition/RequestPath.php
@@ -0,0 +1,159 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\Plugin\Core\Condition\RequestPath.
+ */
+
+namespace Drupal\system\Plugin\Core\Condition;
+
+use Drupal\Component\Annotation\Plugin;
+use Drupal\Component\Utility\Unicode;
+use Drupal\Core\Annotation\Translation;
+use Drupal\Core\Condition\Annotation\Condition;
+use Drupal\Core\Condition\ConditionPluginBase;
+use Drupal\Core\Path\AliasManagerInterface;
+use Drupal\Core\Path\PathMatcherInterface;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
+use Drupal\Core\StringTranslation\TranslationInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\HttpFoundation\Request;
+
+
+/**
+ * Provides a 'Request Path' condition.
+ *
+ * @Condition(
+ *   id = "request_path",
+ *   label = @Translation("Request Path"),
+ * )
+ */
+class RequestPath extends ConditionPluginBase implements ContainerFactoryPluginInterface {
+
+  /**
+   * A request object.
+   *
+   * @var \Symfony\Component\HttpFoundation\Request
+   */
+  protected $request;
+
+  /**
+   * An alias manager to find the alias for the current system path.
+   *
+   * @var \Drupal\Core\Path\AliasManagerInterface
+   */
+  protected $aliasManager;
+
+  /**
+   * A path matcher for matching the path against a pattern.
+   *
+   * @var \Drupal\Core\Path\PathMatcherInterface
+   */
+  protected $pathMatcher;
+
+  /**
+   * The translation manager.
+   *
+   * @var \Drupal\Core\StringTranslation\TranslationInterface
+   */
+  protected $translationManager;
+
+  /**
+   * Constructs a RequestPath condition plugin.
+   *
+   * @param \Symfony\Component\HttpFoundation\Request $request
+   *   The HttpRequest object representing the current request.
+   * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager
+   *   An alias manager to find the alias for the current system path.
+   * @param \Drupal\Core\Path\PathMatcherInterface $path_matcher
+   *   A path matcher for matching the path against a pattern.
+   * @param \Drupal\Core\StringTranslation\TranslationInterface $translation_manager
+   *   The translation manager.
+   * @param array $configuration
+   *   A configuration array containing information about the plugin instance.
+   * @param string $plugin_id
+   *   The plugin_id for the plugin instance.
+   * @param array $plugin_definition
+   *   The plugin implementation definition.
+   */
+  public function __construct(Request $request, AliasManagerInterface $alias_manager, PathMatcherInterface $path_matcher, TranslationInterface $translation_manager, array $configuration, $plugin_id, array $plugin_definition) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+    $this->request = $request;
+    $this->aliasManager = $alias_manager;
+    $this->pathMatcher = $path_matcher;
+    $this->translationManager = $translation_manager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) {
+    return new static(
+      $container->get('request'),
+      $container->get('path.alias_manager'),
+      $container->get('path_matcher'),
+      $container->get('string_translation'),
+      $configuration,
+      $plugin_id,
+      $plugin_definition);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function form($form, &$form_state) {
+    $form['pages'] = array(
+      '#type' => 'textarea',
+      '#title' => $this->t('Pages'),
+      '#default_value' => !empty($this->configuration['pages']) ? $this->configuration['pages'] : '',
+      '#description' => $this->t("Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths are %user for the current user's page and %user-wildcard for every user page. %front is the front page.", array('%user' => 'user', '%user-wildcard' => 'user/*', '%front' => '<front>')),
+    );
+    return parent::form($form, $form_state);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function submit($form, &$form_state) {
+    $this->configuration['pages'] = $form_state['values']['pages'];
+    parent::submit($form, $form_state);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function summary() {
+    $pages = array();
+    foreach (explode("\n", $this->configuration['pages']) as $page) {
+      $pages[] = trim($page);
+    }
+    $pages = implode(', ', $pages);
+    if (!empty($this->configuration['negate'])) {
+      return $this->t('Do not return true on the following pages: @pages', array('@pages' => $pages));
+    }
+    return $this->t('Return true on the following pages: @pages', array('@pages' => $pages));
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function evaluate() {
+    // Convert path to lowercase. This allows comparison of the same path
+    // with different case. Ex: /Page, /page, /PAGE.
+    $pages = Unicode::strtolower($this->configuration['pages']);
+    // Compare the lowercase path alias (if any) and internal path.
+    $path = $this->request->attributes->get('system_path');
+    $path_alias = Unicode::strtolower($this->aliasManager->getPathAlias($path));
+    return $this->pathMatcher->matchPath($path_alias, $pages) || (($path != $path_alias) && $this->pathMatcher->matchPath($path, $pages));
+  }
+
+  /**
+   * Translates a string to the current language or to a given language.
+   *
+   * See the t() documentation for details.
+   */
+  protected function t($string, array $args = array(), array $options = array()) {
+    return $this->translationManager->translate($string, $args, $options);
+  }
+
+}
diff --git a/core/modules/system/tests/Drupal/system/Tests/Condition/RequestPathConditionTest.php b/core/modules/system/tests/Drupal/system/Tests/Condition/RequestPathConditionTest.php
new file mode 100644
index 0000000..0266406
--- /dev/null
+++ b/core/modules/system/tests/Drupal/system/Tests/Condition/RequestPathConditionTest.php
@@ -0,0 +1,101 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\Tests\Condition\RequestPathConditionTest.
+ */
+
+namespace Drupal\system\Tests\Condition;
+
+use Drupal\system\Plugin\Core\Condition\RequestPath;
+use Drupal\Core\Path\PathMatcher;
+use Symfony\Component\HttpFoundation\Request;
+
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * Tests path processor functionality.
+ */
+class RequestPathConditionTest extends UnitTestCase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'Request Path Condition Plugin',
+      'description' => 'Tests that the Request Path Condition, provided by the system module, is working properly.',
+      'group' => 'Condition API',
+    );
+  }
+
+  /**
+   * Tests the RequestPath condition.
+   */
+  public function testConditions() {
+
+    $condition_manager = $this->getMockBuilder('Drupal\Core\Condition\ConditionManager')
+      ->disableOriginalConstructor()
+      ->getMock();
+
+    // Create an alias manager stub.
+    $alias_manager = $this->getMockBuilder('Drupal\Core\Path\AliasManagerInterface')
+      ->getMock();
+
+    // Create an translation manager stub.
+    $translation_manager = $this->getMockBuilder('Drupal\Core\StringTranslation\TranslationInterface')
+      ->getMock();
+
+    $system_path_map = array(
+      // Set up one proper alias that can be resolved to a system path.
+      array('my/aliased/page', NULL, 'foo'),
+    );
+
+    $alias_manager->expects($this->any())
+      ->method('getPathAlias')
+      ->will($this->returnValueMap($system_path_map));
+
+    // Create a stub config factory with all config settings that will be
+    // checked during this test.
+    $config_factory_stub = $this->getConfigFactoryStub(
+      array(
+        'system.site' => array(
+          'page.front' => 'user',
+        ),
+      )
+    );
+    $path_matcher = new PathMatcher($config_factory_stub);
+    $new_request = Request::create('http://test.com/my/pass/page');
+    // The condition checks the system_path attribute of the request so we must
+    // set that to the path we want to evaluate.
+    $new_request->attributes->set('system_path', 'my/pass/page');
+
+    $condition = new RequestPath($new_request, $alias_manager, $path_matcher, $translation_manager, array(), 'request_path', array());
+    $condition->setExecutableManager($condition_manager);
+
+    $pages = "my/pass/page\r\nmy/pass/page2\r\nfoo";
+    $condition->setConfig('pages', $pages);
+
+    // Check the first configured path and summary.
+    $this->assertTrue($condition->evaluate(), 'The system_path my/pass/page passes.');
+
+    // Check the second configured path.
+    $new_request->attributes->set('system_path', 'my/pass/page2');
+    $this->assertTrue($condition->evaluate(), 'The system_path my/pass/page2 passes.');
+
+    // Check that a system path that is not included in the pages config, but
+    // whose alias is, passes.
+    $new_request->attributes->set('system_path', 'my/aliased/page');
+    $this->assertTrue($condition->evaluate(), 'The system_path my/aliased/page passes.');
+
+    $new_request->attributes->set('system_path', 'my/pass/page3');
+    $condition->setConfig('pages', 'my/pass/*');
+    $this->assertTrue($condition->evaluate(), 'The system_path my/pass/page3 passes for wildcard paths.');
+
+    // Check that a system path that is not included in the pages config, either
+    // directly or via an alias, fails.
+    $new_request->attributes->set('system_path', 'my/fail/page4');
+    $this->assertFalse($condition->evaluate(), 'The system_path my/fail/page4 fails.');
+
+  }
+}
