[sessions] Properly namespace recently-componentized TabRestore code

This CL puts all the core TabRestore code that was recently componentized in
the sessions namespace.

BUG=371476
TBR=sky

Review URL: https://codereview.chromium.org/1350653004

Cr-Commit-Position: refs/heads/master@{#349648}
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 03f788b..1de24d7 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -237,7 +237,7 @@
 
   InitCommandState();
 
-  TabRestoreService* tab_restore_service =
+  sessions::TabRestoreService* tab_restore_service =
       TabRestoreServiceFactory::GetForProfile(profile());
   if (tab_restore_service) {
     tab_restore_service->AddObserver(this);
@@ -248,7 +248,7 @@
 BrowserCommandController::~BrowserCommandController() {
   // TabRestoreService may have been shutdown by the time we get here. Don't
   // trigger creating it.
-  TabRestoreService* tab_restore_service =
+  sessions::TabRestoreService* tab_restore_service =
       TabRestoreServiceFactory::GetForProfileIfExisting(profile());
   if (tab_restore_service)
     tab_restore_service->RemoveObserver(this);
@@ -827,17 +827,17 @@
 // BrowserCommandController, TabRestoreServiceObserver implementation:
 
 void BrowserCommandController::TabRestoreServiceChanged(
-    TabRestoreService* service) {
+    sessions::TabRestoreService* service) {
   UpdateTabRestoreCommandState();
 }
 
 void BrowserCommandController::TabRestoreServiceDestroyed(
-    TabRestoreService* service) {
+    sessions::TabRestoreService* service) {
   service->RemoveObserver(this);
 }
 
 void BrowserCommandController::TabRestoreServiceLoaded(
-    TabRestoreService* service) {
+    sessions::TabRestoreService* service) {
   UpdateTabRestoreCommandState();
 }
 
@@ -1322,7 +1322,7 @@
 }
 
 void BrowserCommandController::UpdateTabRestoreCommandState() {
-  TabRestoreService* tab_restore_service =
+  sessions::TabRestoreService* tab_restore_service =
       TabRestoreServiceFactory::GetForProfile(profile());
   // The command is enabled if the service hasn't loaded yet to trigger loading.
   // The command is updated once the load completes.