Change the recent tabs delegate methods name to be more clear

Change the signature to put details about what where is the
sectionIdentifier coming from.

Bug: 1196954
Change-Id: I7b7bc52f969e430bd679f5b43c0832a43194512a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2841987
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Reviewed-by: Mark Cogan <marq@chromium.org>
Reviewed-by: Sebastien Lalancette <seblalancette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#874746}
GitOrigin-RevId: 4ca067f7022dd455c4c569c2af41788892904eab
diff --git a/chrome/browser/ui/menu/tab_context_menu_delegate.h b/chrome/browser/ui/menu/tab_context_menu_delegate.h
index a8df4ed..c76cd6f 100644
--- a/chrome/browser/ui/menu/tab_context_menu_delegate.h
+++ b/chrome/browser/ui/menu/tab_context_menu_delegate.h
@@ -23,11 +23,11 @@
 
 // Tells the delegate to remove Sessions corresponding to the given the table
 // view's |sectionIdentifier|.
-- (void)removeSessionAtSessionSectionIdentifier:(NSInteger)sectionIdentifier;
+- (void)removeSessionAtTableSectionWithIdentifier:(NSInteger)sectionIdentifier;
 
 // Asks the delegate for the Session corresponding to the given the table view's
 // |sectionIdentifier|.
-- (synced_sessions::DistantSession const*)sessionForSectionIdentifier:
+- (synced_sessions::DistantSession const*)sessionForTableSectionWithIdentifier:
     (NSInteger)sectionIdentifier;
 
 @end
diff --git a/chrome/browser/ui/recent_tabs/recent_tabs_coordinator.mm b/chrome/browser/ui/recent_tabs/recent_tabs_coordinator.mm
index 44886dc..ce7a891 100644
--- a/chrome/browser/ui/recent_tabs/recent_tabs_coordinator.mm
+++ b/chrome/browser/ui/recent_tabs/recent_tabs_coordinator.mm
@@ -218,15 +218,15 @@
   [self.sharingCoordinator start];
 }
 
-- (void)removeSessionAtSessionSectionIdentifier:(NSInteger)sectionIdentifier {
+- (void)removeSessionAtTableSectionWithIdentifier:(NSInteger)sectionIdentifier {
   [self.recentTabsTableViewController
-      removeSessionAtSessionSectionIdentifier:sectionIdentifier];
+      removeSessionAtTableSectionWithIdentifier:sectionIdentifier];
 }
 
-- (synced_sessions::DistantSession const*)sessionForSectionIdentifier:
+- (synced_sessions::DistantSession const*)sessionForTableSectionWithIdentifier:
     (NSInteger)sectionIdentifier {
   return [self.recentTabsTableViewController
-      sessionForSectionIdentifier:sectionIdentifier];
+      sessionForTableSectionWithIdentifier:sectionIdentifier];
 }
 
 @end
diff --git a/chrome/browser/ui/recent_tabs/recent_tabs_menu_helper.mm b/chrome/browser/ui/recent_tabs/recent_tabs_menu_helper.mm
index b2dff63..f14b52c 100644
--- a/chrome/browser/ui/recent_tabs/recent_tabs_menu_helper.mm
+++ b/chrome/browser/ui/recent_tabs/recent_tabs_menu_helper.mm
@@ -134,7 +134,7 @@
 
         synced_sessions::DistantSession const* session =
             [weakSelf.contextMenuDelegate
-                sessionForSectionIdentifier:sectionIdentifier];
+                sessionForTableSectionWithIdentifier:sectionIdentifier];
 
         if (!session->tabs.empty()) {
           [menuElements addObject:[actionFactory actionToOpenAllTabsWithBlock:^{
@@ -146,7 +146,7 @@
         [menuElements
             addObject:[actionFactory actionToHideWithBlock:^{
               [strongSelf.contextMenuDelegate
-                  removeSessionAtSessionSectionIdentifier:sectionIdentifier];
+                  removeSessionAtTableSectionWithIdentifier:sectionIdentifier];
             }]];
 
         return [UIMenu menuWithTitle:@"" children:menuElements];
diff --git a/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.h b/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.h
index e1f1c6f..1ff622a 100644
--- a/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.h
+++ b/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.h
@@ -59,11 +59,12 @@
 - (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE;
 
 // Returns Sessions corresponding to the given |sectionIdentifier|.
-- (synced_sessions::DistantSession const*)sessionForSectionIdentifier:
+- (synced_sessions::DistantSession const*)sessionForTableSectionWithIdentifier:
     (NSInteger)sectionIdentifer;
 
-// Hides Sessions corresponding to the given |sectionIdentifier|.
-- (void)removeSessionAtSessionSectionIdentifier:(NSInteger)sectionIdentifier;
+// Hides Sessions corresponding to the given the table view's
+// |sectionIdentifier|.
+- (void)removeSessionAtTableSectionWithIdentifier:(NSInteger)sectionIdentifier;
 
 @end
 
diff --git a/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm b/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm
index 9099363..4543ca7 100644
--- a/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm
+++ b/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm
@@ -679,7 +679,7 @@
 
 #pragma mark - Public
 
-- (synced_sessions::DistantSession const*)sessionForSectionIdentifier:
+- (synced_sessions::DistantSession const*)sessionForTableSectionWithIdentifier:
     (NSInteger)sectionIdentifer {
   NSInteger section =
       [self.tableViewModel sectionForSectionIdentifier:sectionIdentifer];
@@ -687,10 +687,10 @@
   return _syncedSessions->GetSession(section - kNumberOfSectionsBeforeSessions);
 }
 
-- (void)removeSessionAtSessionSectionIdentifier:(NSInteger)sectionIdentifier {
+- (void)removeSessionAtTableSectionWithIdentifier:(NSInteger)sectionIdentifier {
   DCHECK([self isSessionSectionIdentifier:sectionIdentifier]);
   synced_sessions::DistantSession const* session =
-      [self sessionForSectionIdentifier:sectionIdentifier];
+      [self sessionForTableSectionWithIdentifier:sectionIdentifier];
   std::string sessionTagCopy = session->tag;
 
   NSInteger section =
@@ -1348,7 +1348,7 @@
   [self.contextMenuCoordinator
       addItemWithTitle:hideButtonLabel
                 action:^{
-                  [weakSelf removeSessionAtSessionSectionIdentifier:
+                  [weakSelf removeSessionAtTableSectionWithIdentifier:
                                 sectionIdentifier];
                 }
                  style:UIAlertActionStyleDefault];
@@ -1358,7 +1358,7 @@
 
 - (void)openTabsFromSessionSectionIdentifier:(NSInteger)sectionIdentifier {
   synced_sessions::DistantSession const* session =
-      [self sessionForSectionIdentifier:sectionIdentifier];
+      [self sessionForTableSectionWithIdentifier:sectionIdentifier];
   [self.presentationDelegate openAllTabsFromSession:session];
 }
 
diff --git a/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_coordinator.mm b/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_coordinator.mm
index d277ab7..0c9482d 100644
--- a/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_coordinator.mm
+++ b/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_coordinator.mm
@@ -820,15 +820,15 @@
   [self.sharingCoordinator start];
 }
 
-- (void)removeSessionAtSessionSectionIdentifier:(NSInteger)sectionIdentifier {
+- (void)removeSessionAtTableSectionWithIdentifier:(NSInteger)sectionIdentifier {
   [self.baseViewController.remoteTabsViewController
-      removeSessionAtSessionSectionIdentifier:sectionIdentifier];
+      removeSessionAtTableSectionWithIdentifier:sectionIdentifier];
 }
 
-- (synced_sessions::DistantSession const*)sessionForSectionIdentifier:
+- (synced_sessions::DistantSession const*)sessionForTableSectionWithIdentifier:
     (NSInteger)sectionIdentifier {
   return [self.baseViewController.remoteTabsViewController
-      sessionForSectionIdentifier:sectionIdentifier];
+      sessionForTableSectionWithIdentifier:sectionIdentifier];
 }
 
 #pragma mark - SceneStateObserver