diff --git a/core/core.services.yml b/core/core.services.yml
index 7b326eb..67c0ee4 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -190,8 +190,8 @@ services:
     arguments: ['@container.namespaces']
   lock:
     class: Drupal\Core\Lock\DatabaseLockBackend
-  user.tempstore:
-    class: Drupal\user\TempStoreFactory
+  tempstore:
+    class: Drupal\Core\TempStore\TempStoreFactory
     arguments: ['@database', '@lock']
   router.request_context:
     class: Symfony\Component\Routing\RequestContext
diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php
index 5f3aad0..12899da 100644
--- a/core/lib/Drupal.php
+++ b/core/lib/Drupal.php
@@ -381,4 +381,14 @@ public static function translation() {
     return static::$container->get('string_translation');
   }
 
+  /**
+   * Returns the tempstore factory service.
+   *
+   * @return \Drupal\Core\TempStore\TempStoreFactory
+   *   The tempstore factory.
+   */
+  public static function tempstore() {
+    return static::$container->get('tempstore');
+  }
+
 }
diff --git a/core/lib/Drupal/Core/TempStore/TempStore.php b/core/lib/Drupal/Core/TempStore/TempStore.php
new file mode 100644
index 0000000..a4b5ce1
--- /dev/null
+++ b/core/lib/Drupal/Core/TempStore/TempStore.php
@@ -0,0 +1,197 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\TempStore\TempStore.
+ */
+
+namespace Drupal\Core\TempStore;
+
+use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface;
+use Drupal\Core\Lock\LockBackendInterface;
+
+/**
+ * Stores and retrieves temporary data for a given owner.
+ *
+ * A TempStore can be used to make temporary, non-cache data available across
+ * requests. The data for the TempStore is stored in one key/value collection.
+ * TempStore data expires automatically after a given timeframe.
+ *
+ * The TempStore is different from a cache, because the data in it is not yet
+ * saved permanently and so it cannot be rebuilt. Typically, the TempStore
+ * might be used to store work in progress that is later saved permanently
+ * elsewhere, e.g. autosave data, multistep forms, or in-progress changes
+ * to complex configuration that are not ready to be saved.
+ *
+ * Each TempStore belongs to a particular owner (e.g. a user, session, or
+ * process). Multiple owners may use the same key/value collection, and the
+ * owner is stored along with the key/value pair.
+ *
+ * Every key is unique within the collection, so the TempStore can check
+ * whether a particular key is already set by a different owner. This is
+ * useful for informing one owner that the data is already in use by another;
+ * for example, to let one user know that another user is in the process of
+ * editing certain data, or even to restrict other users from editing it at
+ * the same time. It is the responsibility of the implementation to decide
+ * when and whether one owner can use or update another owner's data.
+ *
+ * @todo We could add getIfOwner() or setIfOwner() methods to make this more
+ *   explicit.
+ */
+class TempStore {
+
+  /**
+   * The key/value storage object used for this data.
+   *
+   * @var Drupal\Core\KeyValueStore\KeyValueStoreExpireInterface;
+   */
+  protected $storage;
+
+  /**
+   * The lock object used for this data.
+   *
+   * @var Drupal\Core\Lock\LockBackendInterface
+   */
+  protected $lockBackend;
+
+  /**
+   * The owner key to store along with the data (e.g. a user or session ID).
+   *
+   * @var mixed
+   */
+  protected $owner;
+
+  /**
+   * The time to live for items in seconds.
+   *
+   * By default, data is stored for one week (604800 seconds) before expiring.
+   *
+   * @var int
+   *
+   * @todo Currently, this property is not exposed anywhere, and so the only
+   *   way to override it is by extending the class.
+   */
+  protected $expire = 604800;
+
+  /**
+   * Constructs a new object for accessing data from a key/value store.
+   *
+   * @param KeyValueStoreExpireInterface $storage
+   *   The key/value storage object used for this data. Each storage object
+   *   represents a particular collection of data and will contain any number
+   *   of key/value pairs.
+   * @param Drupal\Core\Lock\LockBackendInterface $lockBackend
+   *   The lock object used for this data.
+   * @param mixed $owner
+   *   The owner key to store along with the data (e.g. a user or session ID).
+   */
+  function __construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lockBackend, $owner) {
+    $this->storage = $storage;
+    $this->lockBackend = $lockBackend;
+    $this->owner = $owner;
+  }
+
+  /**
+   * Retrieves a value from this TempStore for a given key.
+   *
+   * @param string $key
+   *   The key of the data to retrieve.
+   *
+   * @return mixed
+   *   The data associated with the key, or NULL if the key does not exist.
+   */
+  function get($key) {
+    if ($object = $this->storage->get($key)) {
+      return $object->data;
+    }
+  }
+
+  /**
+   * Stores a particular key/value pair only if the key doesn't already exist.
+   *
+   * @param string $key
+   *   The key of the data to check and store.
+   * @param mixed $value
+   *   The data to store.
+   *
+   * @return bool
+   *   TRUE if the data was set, or FALSE if it already existed.
+   */
+  function setIfNotExists($key, $value) {
+    $value = (object) array(
+      'owner' => $this->owner,
+      'data' => $value,
+      'updated' => REQUEST_TIME,
+    );
+    return $this->storage->setWithExpireIfNotExists($key, $value, $this->expire);
+  }
+
+  /**
+   * Stores a particular key/value pair in this TempStore.
+   *
+   * @param string $key
+   *   The key of the data to store.
+   * @param mixed $value
+   *   The data to store.
+   */
+  function set($key, $value) {
+    if (!$this->lockBackend->acquire($key)) {
+      $this->lockBackend->wait($key);
+      if (!$this->lockBackend->acquire($key)) {
+        throw new TempStoreException(format_string("Couldn't acquire lock to update item %key in %collection temporary storage.", array(
+          '%key' => $key,
+          '%collection' => $this->storage->collection,
+        )));
+      }
+    }
+
+    $value = (object) array(
+      'owner' => $this->owner,
+      'data' => $value,
+      'updated' => REQUEST_TIME,
+    );
+    $this->storage->setWithExpire($key, $value, $this->expire);
+    $this->lockBackend->release($key);
+  }
+
+  /**
+   * Returns the metadata associated with a particular key/value pair.
+   *
+   * @param string $key
+   *   The key of the data to store.
+   *
+   * @return mixed
+   *   An object with the owner and updated time if the key has a value, or
+   *   NULL otherwise.
+   */
+  function getMetadata($key) {
+    // Fetch the key/value pair and its metadata.
+    $object = $this->storage->get($key);
+    if ($object) {
+      // Don't keep the data itself in memory.
+      unset($object->data);
+      return $object;
+    }
+  }
+
+  /**
+   * Deletes data from the store for a given key and releases the lock on it.
+   *
+   * @param string $key
+   *   The key of the data to delete.
+   */
+  function delete($key) {
+    if (!$this->lockBackend->acquire($key)) {
+      $this->lockBackend->wait($key);
+      if (!$this->lockBackend->acquire($key)) {
+        throw new TempStoreException(format_string("Couldn't acquire lock to delete item %key from %collection temporary storage.", array(
+          '%key' => $key,
+          '%collection' => $this->storage->collection,
+        )));
+      }
+    }
+    $this->storage->delete($key);
+    $this->lockBackend->release($key);
+  }
+
+}
diff --git a/core/lib/Drupal/Core/TempStore/TempStoreException.php b/core/lib/Drupal/Core/TempStore/TempStoreException.php
new file mode 100644
index 0000000..b985f2e
--- /dev/null
+++ b/core/lib/Drupal/Core/TempStore/TempStoreException.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\TempStore\TempStoreException.
+ */
+
+namespace Drupal\Core\TempStore;
+
+/**
+ * Defines the exception thrown if the TempStore cannot acquire a lock.
+ */
+class TempStoreException extends \Exception {}
diff --git a/core/lib/Drupal/Core/TempStore/TempStoreFactory.php b/core/lib/Drupal/Core/TempStore/TempStoreFactory.php
new file mode 100644
index 0000000..ce85469
--- /dev/null
+++ b/core/lib/Drupal/Core/TempStore/TempStoreFactory.php
@@ -0,0 +1,72 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Core\TempStore\TempStoreFactory.
+ */
+
+namespace Drupal\Core\TempStore;
+
+use Drupal\Core\Database\Connection;
+use Drupal\Core\KeyValueStore\DatabaseStorageExpirable;
+use Drupal\Core\Lock\LockBackendInterface;
+
+/**
+ * Creates a key/value storage object for the current user or anonymous session.
+ */
+class TempStoreFactory {
+
+  /**
+   * The connection object used for this data.
+   *
+   * @var Drupal\Core\Database\Connection $connection
+   */
+  protected $connection;
+
+  /**
+   * The lock object used for this data.
+   *
+   * @var Drupal\Core\Lock\LockBackendInterface $lockBackend
+   */
+  protected $lockBackend;
+
+  /**
+   * Constructs a Drupal\Core\TempStore\TempStoreFactory object.
+   *
+   * @param Drupal\Core\Database\Connection $connection
+   *   The connection object used for this data.
+   * @param Drupal\Core\Lock\LockBackendInterface $lockBackend
+   *   The lock object used for this data.
+   */
+  function __construct(Connection $connection, LockBackendInterface $lockBackend) {
+    $this->connection = $connection;
+    $this->lockBackend = $lockBackend;
+  }
+
+  /**
+   * Creates a TempStore for the current user or anonymous session.
+   *
+   * @param string $collection
+   *   The collection name to use for this key/value store. This is typically
+   *   a shared namespace or module name, e.g. 'views', 'entity', etc.
+   * @param mixed $owner
+   *   (optional) The owner of this TempStore. By default, the TempStore is
+   *   owned by the currently authenticated user, or by the active anonymous
+   *   session if no user is logged in.
+   *
+   * @return Drupal\Core\TempStore\TempStore
+   *   An instance of the the key/value store.
+   */
+  function get($collection, $owner = NULL) {
+    // Use the currently authenticated user ID or the active user ID unless
+    // the owner is overridden.
+    if (!isset($owner)) {
+      $owner = $GLOBALS['user']->uid ?: session_id();
+    }
+
+    // Store the data for this collection in the database.
+    $storage = new DatabaseStorageExpirable($collection, $this->connection);
+    return new TempStore($storage, $this->lockBackend, $owner);
+  }
+
+}
diff --git a/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php b/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php
index c11dbd8..fa0f20a 100644
--- a/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php
+++ b/core/modules/node/lib/Drupal/node/Form/DeleteMultiple.php
@@ -11,7 +11,7 @@
 use Drupal\Core\ControllerInterface;
 use Drupal\Core\Entity\EntityManager;
 use Drupal\Component\Utility\String;
-use Drupal\user\TempStoreFactory;
+use Drupal\Core\TempStore\TempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -29,7 +29,7 @@ class DeleteMultiple extends ConfirmFormBase implements ControllerInterface {
   /**
    * The tempstore factory.
    *
-   * @var \Drupal\user\TempStoreFactory
+   * @var \Drupal\Core\TempStore\TempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -43,7 +43,7 @@ class DeleteMultiple extends ConfirmFormBase implements ControllerInterface {
   /**
    * Constructs a DeleteMultiple form object.
    *
-   * @param \Drupal\user\TempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\TempStoreFactory $temp_store_factory
    *   The tempstore factory.
    * @param \Drupal\Core\Entity\EntityManager $manager
    *   The entity manager.
@@ -58,7 +58,7 @@ public function __construct(TempStoreFactory $temp_store_factory, EntityManager
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('user.tempstore'),
+      $container->get('tempstore'),
       $container->get('plugin.manager.entity')
     );
   }
diff --git a/core/modules/node/lib/Drupal/node/Plugin/Action/DeleteNode.php b/core/modules/node/lib/Drupal/node/Plugin/Action/DeleteNode.php
index f4a5eff..0cd925b 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/Action/DeleteNode.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/Action/DeleteNode.php
@@ -10,7 +10,7 @@
 use Drupal\Core\Annotation\Action;
 use Drupal\Core\Annotation\Translation;
 use Drupal\Core\Action\ActionBase;
-use Drupal\user\TempStoreFactory;
+use Drupal\Core\TempStore\TempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -28,7 +28,7 @@ class DeleteNode extends ActionBase {
   /**
    * The tempstore object.
    *
-   * @var \Drupal\user\TempStore
+   * @var \Drupal\Core\TempStore\TempStore
    */
   protected $tempStore;
 
@@ -41,7 +41,7 @@ class DeleteNode extends ActionBase {
    *   The plugin ID for the plugin instance.
    * @param array $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\user\TempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\TempStoreFactory $temp_store_factory
    *   The tempstore factory.
    */
   public function __construct(array $configuration, $plugin_id, array $plugin_definition, TempStoreFactory $temp_store_factory) {
@@ -54,7 +54,7 @@ public function __construct(array $configuration, $plugin_id, array $plugin_defi
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) {
-    return new static($configuration, $plugin_id, $plugin_definition, $container->get('user.tempstore'));
+    return new static($configuration, $plugin_id, $plugin_definition, $container->get('tempstore'));
   }
 
   /**
diff --git a/core/modules/user/lib/Drupal/user/Plugin/Action/CancelUser.php b/core/modules/user/lib/Drupal/user/Plugin/Action/CancelUser.php
index 58e9e37..3e33a3a 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/Action/CancelUser.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/Action/CancelUser.php
@@ -10,7 +10,7 @@
 use Drupal\Core\Annotation\Action;
 use Drupal\Core\Annotation\Translation;
 use Drupal\Core\Action\ActionBase;
-use Drupal\user\TempStoreFactory;
+use Drupal\Core\TempStore\TempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -28,7 +28,7 @@ class CancelUser extends ActionBase {
   /**
    * The tempstore factory.
    *
-   * @var \Drupal\user\TempStoreFactory
+   * @var \Drupal\Core\TempStore\TempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -41,7 +41,7 @@ class CancelUser extends ActionBase {
    *   The plugin ID for the plugin instance.
    * @param array $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\user\TempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\TempStoreFactory $temp_store_factory
    *   The tempstore factory.
    */
   public function __construct(array $configuration, $plugin_id, array $plugin_definition, TempStoreFactory $temp_store_factory) {
@@ -54,7 +54,7 @@ public function __construct(array $configuration, $plugin_id, array $plugin_defi
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) {
-    return new static($configuration, $plugin_id, $plugin_definition, $container->get('user.tempstore'));
+    return new static($configuration, $plugin_id, $plugin_definition, $container->get('tempstore'));
   }
 
   /**
diff --git a/core/modules/user/lib/Drupal/user/TempStore.php b/core/modules/user/lib/Drupal/user/TempStore.php
deleted file mode 100644
index c8a6dd1..0000000
--- a/core/modules/user/lib/Drupal/user/TempStore.php
+++ /dev/null
@@ -1,197 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\user\TempStore.
- */
-
-namespace Drupal\user;
-
-use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface;
-use Drupal\Core\Lock\LockBackendInterface;
-
-/**
- * Stores and retrieves temporary data for a given owner.
- *
- * A TempStore can be used to make temporary, non-cache data available across
- * requests. The data for the TempStore is stored in one key/value collection.
- * TempStore data expires automatically after a given timeframe.
- *
- * The TempStore is different from a cache, because the data in it is not yet
- * saved permanently and so it cannot be rebuilt. Typically, the TempStore
- * might be used to store work in progress that is later saved permanently
- * elsewhere, e.g. autosave data, multistep forms, or in-progress changes
- * to complex configuration that are not ready to be saved.
- *
- * Each TempStore belongs to a particular owner (e.g. a user, session, or
- * process). Multiple owners may use the same key/value collection, and the
- * owner is stored along with the key/value pair.
- *
- * Every key is unique within the collection, so the TempStore can check
- * whether a particular key is already set by a different owner. This is
- * useful for informing one owner that the data is already in use by another;
- * for example, to let one user know that another user is in the process of
- * editing certain data, or even to restrict other users from editing it at
- * the same time. It is the responsibility of the implementation to decide
- * when and whether one owner can use or update another owner's data.
- *
- * @todo We could add getIfOwner() or setIfOwner() methods to make this more
- *   explicit.
- */
-class TempStore {
-
-  /**
-   * The key/value storage object used for this data.
-   *
-   * @var Drupal\Core\KeyValueStore\KeyValueStoreExpireInterface;
-   */
-  protected $storage;
-
-  /**
-   * The lock object used for this data.
-   *
-   * @var Drupal\Core\Lock\LockBackendInterface
-   */
-  protected $lockBackend;
-
-  /**
-   * The owner key to store along with the data (e.g. a user or session ID).
-   *
-   * @var mixed
-   */
-  protected $owner;
-
-  /**
-   * The time to live for items in seconds.
-   *
-   * By default, data is stored for one week (604800 seconds) before expiring.
-   *
-   * @var int
-   *
-   * @todo Currently, this property is not exposed anywhere, and so the only
-   *   way to override it is by extending the class.
-   */
-  protected $expire = 604800;
-
-  /**
-   * Constructs a new object for accessing data from a key/value store.
-   *
-   * @param KeyValueStoreExpireInterface $storage
-   *   The key/value storage object used for this data. Each storage object
-   *   represents a particular collection of data and will contain any number
-   *   of key/value pairs.
-   * @param Drupal\Core\Lock\LockBackendInterface $lockBackend
-   *   The lock object used for this data.
-   * @param mixed $owner
-   *   The owner key to store along with the data (e.g. a user or session ID).
-   */
-  function __construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lockBackend, $owner) {
-    $this->storage = $storage;
-    $this->lockBackend = $lockBackend;
-    $this->owner = $owner;
-  }
-
-  /**
-   * Retrieves a value from this TempStore for a given key.
-   *
-   * @param string $key
-   *   The key of the data to retrieve.
-   *
-   * @return mixed
-   *   The data associated with the key, or NULL if the key does not exist.
-   */
-  function get($key) {
-    if ($object = $this->storage->get($key)) {
-      return $object->data;
-    }
-  }
-
-  /**
-   * Stores a particular key/value pair only if the key doesn't already exist.
-   *
-   * @param string $key
-   *   The key of the data to check and store.
-   * @param mixed $value
-   *   The data to store.
-   *
-   * @return bool
-   *   TRUE if the data was set, or FALSE if it already existed.
-   */
-  function setIfNotExists($key, $value) {
-    $value = (object) array(
-      'owner' => $this->owner,
-      'data' => $value,
-      'updated' => REQUEST_TIME,
-    );
-    return $this->storage->setWithExpireIfNotExists($key, $value, $this->expire);
-  }
-
-  /**
-   * Stores a particular key/value pair in this TempStore.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   * @param mixed $value
-   *   The data to store.
-   */
-  function set($key, $value) {
-    if (!$this->lockBackend->acquire($key)) {
-      $this->lockBackend->wait($key);
-      if (!$this->lockBackend->acquire($key)) {
-        throw new TempStoreException(format_string("Couldn't acquire lock to update item %key in %collection temporary storage.", array(
-          '%key' => $key,
-          '%collection' => $this->storage->collection,
-        )));
-      }
-    }
-
-    $value = (object) array(
-      'owner' => $this->owner,
-      'data' => $value,
-      'updated' => REQUEST_TIME,
-    );
-    $this->storage->setWithExpire($key, $value, $this->expire);
-    $this->lockBackend->release($key);
-  }
-
-  /**
-   * Returns the metadata associated with a particular key/value pair.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   *
-   * @return mixed
-   *   An object with the owner and updated time if the key has a value, or
-   *   NULL otherwise.
-   */
-  function getMetadata($key) {
-    // Fetch the key/value pair and its metadata.
-    $object = $this->storage->get($key);
-    if ($object) {
-      // Don't keep the data itself in memory.
-      unset($object->data);
-      return $object;
-    }
-  }
-
-  /**
-   * Deletes data from the store for a given key and releases the lock on it.
-   *
-   * @param string $key
-   *   The key of the data to delete.
-   */
-  function delete($key) {
-    if (!$this->lockBackend->acquire($key)) {
-      $this->lockBackend->wait($key);
-      if (!$this->lockBackend->acquire($key)) {
-        throw new TempStoreException(format_string("Couldn't acquire lock to delete item %key from %collection temporary storage.", array(
-          '%key' => $key,
-          '%collection' => $this->storage->collection,
-        )));
-      }
-    }
-    $this->storage->delete($key);
-    $this->lockBackend->release($key);
-  }
-
-}
diff --git a/core/modules/user/lib/Drupal/user/TempStoreException.php b/core/modules/user/lib/Drupal/user/TempStoreException.php
deleted file mode 100644
index 497a2ef..0000000
--- a/core/modules/user/lib/Drupal/user/TempStoreException.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\user\TempStoreException.
- */
-
-namespace Drupal\user;
-
-/**
- * Defines the exception thrown if the TempStore cannot acquire a lock.
- */
-class TempStoreException extends \Exception {}
diff --git a/core/modules/user/lib/Drupal/user/TempStoreFactory.php b/core/modules/user/lib/Drupal/user/TempStoreFactory.php
deleted file mode 100644
index ddd1a75..0000000
--- a/core/modules/user/lib/Drupal/user/TempStoreFactory.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\user\TempStoreFactory.
- */
-
-namespace Drupal\user;
-
-use Drupal\Core\Database\Connection;
-use Drupal\Core\KeyValueStore\DatabaseStorageExpirable;
-use Drupal\Core\Lock\LockBackendInterface;
-
-/**
- * Creates a key/value storage object for the current user or anonymous session.
- */
-class TempStoreFactory {
-
-  /**
-   * The connection object used for this data.
-   *
-   * @var Drupal\Core\Database\Connection $connection
-   */
-  protected $connection;
-
-  /**
-   * The lock object used for this data.
-   *
-   * @var Drupal\Core\Lock\LockBackendInterface $lockBackend
-   */
-  protected $lockBackend;
-
-  /**
-   * Constructs a Drupal\user\TempStoreFactory object.
-   *
-   * @param Drupal\Core\Database\Connection $connection
-   *   The connection object used for this data.
-   * @param Drupal\Core\Lock\LockBackendInterface $lockBackend
-   *   The lock object used for this data.
-   */
-  function __construct(Connection $connection, LockBackendInterface $lockBackend) {
-    $this->connection = $connection;
-    $this->lockBackend = $lockBackend;
-  }
-
-  /**
-   * Creates a TempStore for the current user or anonymous session.
-   *
-   * @param string $collection
-   *   The collection name to use for this key/value store. This is typically
-   *   a shared namespace or module name, e.g. 'views', 'entity', etc.
-   * @param mixed $owner
-   *   (optional) The owner of this TempStore. By default, the TempStore is
-   *   owned by the currently authenticated user, or by the active anonymous
-   *   session if no user is logged in.
-   *
-   * @return Drupal\user\TempStore
-   *   An instance of the the key/value store.
-   */
-  function get($collection, $owner = NULL) {
-    // Use the currently authenticated user ID or the active user ID unless
-    // the owner is overridden.
-    if (!isset($owner)) {
-      $owner = $GLOBALS['user']->uid ?: session_id();
-    }
-
-    // Store the data for this collection in the database.
-    $storage = new DatabaseStorageExpirable($collection, $this->connection);
-    return new TempStore($storage, $this->lockBackend, $owner);
-  }
-
-}
diff --git a/core/modules/user/lib/Drupal/user/Tests/TempStoreDatabaseTest.php b/core/modules/user/lib/Drupal/user/Tests/TempStoreDatabaseTest.php
index 5fb54e3..2fdc323 100644
--- a/core/modules/user/lib/Drupal/user/Tests/TempStoreDatabaseTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/TempStoreDatabaseTest.php
@@ -8,7 +8,7 @@
 namespace Drupal\user\Tests;
 
 use Drupal\simpletest\UnitTestBase;
-use Drupal\user\TempStoreFactory;
+use Drupal\Core\TempStore\TempStoreFactory;
 use Drupal\Core\Lock\DatabaseLockBackend;
 use Drupal\Core\Database\Database;
 
@@ -22,7 +22,7 @@ class TempStoreDatabaseTest extends UnitTestBase {
   /**
    * A key/value store factory.
    *
-   * @var Drupal\user\TempStoreFactory
+   * @var Drupal\Core\TempStore\TempStoreFactory
    */
   protected $storeFactory;
 
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php
index 7dc1ee3..3ed5c83 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php
@@ -13,7 +13,7 @@
 use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\views\ViewStorageInterface;
 use Drupal\Core\Entity\EntityManager;
-use Drupal\user\TempStoreFactory;
+use Drupal\Core\TempStore\TempStoreFactory;
 
 /**
  * Builds the form to break the lock of an edited view.
@@ -30,7 +30,7 @@ class BreakLockForm extends ConfirmFormBase implements ControllerInterface {
   /**
    * Stores the user tempstore.
    *
-   * @var \Drupal\user\TempStore
+   * @var \Drupal\Core\TempStore\TempStore
    */
   protected $tempStore;
 
@@ -46,7 +46,7 @@ class BreakLockForm extends ConfirmFormBase implements ControllerInterface {
    *
    * @param \Drupal\Core\Entity\EntityManager $entity_manager
    *   The Entity manager.
-   * @param \Drupal\user\TempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\TempStoreFactory $temp_store_factory
    *   The factory for the temp store object.
    */
   public function __construct(EntityManager $entity_manager, TempStoreFactory $temp_store_factory) {
@@ -60,7 +60,7 @@ public function __construct(EntityManager $entity_manager, TempStoreFactory $tem
   public static function create(ContainerInterface $container) {
     return new static(
       $container->get('plugin.manager.entity'),
-      $container->get('user.tempstore')
+      $container->get('tempstore')
     );
   }
 
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ParamConverter/ViewUIConverter.php b/core/modules/views_ui/lib/Drupal/views_ui/ParamConverter/ViewUIConverter.php
index f828de1..cf71f9b 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/ParamConverter/ViewUIConverter.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/ParamConverter/ViewUIConverter.php
@@ -9,7 +9,7 @@
 
 use Symfony\Component\Routing\Route;
 use Drupal\Core\ParamConverter\ParamConverterInterface;
-use Drupal\user\TempStoreFactory;
+use Drupal\Core\TempStore\TempStoreFactory;
 use Drupal\views\ViewStorageInterface;
 use Drupal\views_ui\ViewUI;
 
@@ -21,14 +21,14 @@ class ViewUIConverter implements ParamConverterInterface {
   /**
    * Stores the tempstore factory.
    *
-   * @var \Drupal\user\TempStoreFactory
+   * @var \Drupal\Core\TempStore\TempStoreFactory
    */
   protected $tempStoreFactory;
 
   /**
    * Constructs a new ViewUIConverter.
    *
-   * @param \Drupal\user\TempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\TempStoreFactory $temp_store_factory
    *   The factory for the temp store object.
    */
   public function __construct(TempStoreFactory $temp_store_factory) {
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php b/core/modules/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php
index 472b460..b014b8f 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php
@@ -11,8 +11,8 @@
 use Drupal\views\ViewStorageInterface;
 use Drupal\views_ui\ViewUI;
 use Drupal\views\ViewsData;
-use Drupal\user\TempStore;
-use Drupal\user\TempStoreFactory;
+use Drupal\Core\TempStore\TempStore;
+use Drupal\Core\TempStore\TempStoreFactory;
 use Drupal\Core\ControllerInterface;
 use Drupal\Core\Entity\EntityManager;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -44,7 +44,7 @@ class ViewsUIController implements ControllerInterface {
   /**
    * Stores the user tempstore.
    *
-   * @var \Drupal\user\TempStore
+   * @var \Drupal\Core\TempStore\TempStore
    */
   protected $tempStore;
 
@@ -55,7 +55,7 @@ class ViewsUIController implements ControllerInterface {
    *   The Entity manager.
    * @param \Drupal\views\ViewsData views_data
    *   The Views data cache object.
-   * @param \Drupal\user\TempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\TempStoreFactory $temp_store_factory
    *   The factory for the temp store object.
    */
   public function __construct(EntityManager $entity_manager, ViewsData $views_data, TempStoreFactory $temp_store_factory) {
@@ -71,7 +71,7 @@ public static function create(ContainerInterface $container) {
     return new static(
       $container->get('plugin.manager.entity'),
       $container->get('views.views_data'),
-      $container->get('user.tempstore')
+      $container->get('tempstore')
     );
   }
 
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/CachedDataUITest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/CachedDataUITest.php
index 2c73550..e323121 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/CachedDataUITest.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/CachedDataUITest.php
@@ -33,7 +33,7 @@ public static function getInfo() {
   public function testCacheData() {
     $views_admin_user_uid = $this->fullAdminUser->id();
 
-    $temp_store = $this->container->get('user.tempstore')->get('views');
+    $temp_store = $this->container->get('tempstore')->get('views');
     // The view should not be locked.
     $this->assertEqual($temp_store->getMetadata('test_view'), NULL, 'The view is not locked.');
 
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
index fc6f511..e452e42 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
@@ -13,7 +13,7 @@
 use Drupal\Component\Utility\NestedArray;
 use Drupal\views\ViewExecutable;
 use Drupal\Core\Entity\EntityControllerInterface;
-use Drupal\user\TempStoreFactory;
+use Drupal\Core\TempStore\TempStoreFactory;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -25,7 +25,7 @@ class ViewEditFormController extends ViewFormControllerBase implements EntityCon
   /**
    * The views temp store.
    *
-   * @var \Drupal\user\TempStore
+   * @var \Drupal\Core\TempStore\TempStore
    */
   protected $tempStore;
 
@@ -41,7 +41,7 @@ class ViewEditFormController extends ViewFormControllerBase implements EntityCon
    *
    * @param string $operation
    *   The name of the current operation.
-   * @param \Drupal\user\TempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\TempStoreFactory $temp_store_factory
    *   The factory for the temp store object.
    * @param \Symfony\Component\HttpFoundation\Request $request
    *   The request object.
@@ -59,7 +59,7 @@ public function __construct($operation, TempStoreFactory $temp_store_factory, Re
   public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info, $operation = NULL) {
     return new static(
       $operation,
-      $container->get('user.tempstore'),
+      $container->get('tempstore'),
       $container->get('request')
     );
   }
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php
index b0efc08..860bb03 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php
@@ -8,7 +8,7 @@
 namespace Drupal\views_ui;
 
 use Drupal\Core\Entity\EntityControllerInterface;
-use Drupal\user\TempStoreFactory;
+use Drupal\Core\TempStore\TempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -19,7 +19,7 @@ class ViewPreviewFormController extends ViewFormControllerBase implements Entity
   /**
    * The views temp store.
    *
-   * @var \Drupal\user\TempStore
+   * @var \Drupal\Core\TempStore\TempStore
    */
   protected $tempStore;
 
@@ -28,7 +28,7 @@ class ViewPreviewFormController extends ViewFormControllerBase implements Entity
    *
    * @param string $operation
    *   The name of the current operation.
-   * @param \Drupal\user\TempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\TempStoreFactory $temp_store_factory
    *   The factory for the temp store object.
    */
   public function __construct($operation, TempStoreFactory $temp_store_factory) {
@@ -43,7 +43,7 @@ public function __construct($operation, TempStoreFactory $temp_store_factory) {
   public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info, $operation = NULL) {
     return new static(
       $operation,
-      $container->get('user.tempstore')
+      $container->get('tempstore')
     );
   }
 
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewUI.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewUI.php
index cbaa672..fb7b224 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/ViewUI.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewUI.php
@@ -60,7 +60,7 @@ class ViewUI implements ViewStorageInterface {
    * If this view is locked for editing.
    *
    * If this view is locked it will contain the result of
-   * \Drupal\user\TempStore::getMetadata(). Which can be a stdClass or NULL.
+   * \Drupal\Core\TempStore\TempStore::getMetadata(). Which can be a stdClass or NULL.
    *
    * @var stdClass
    */
