| Index: chrome/browser/ui/browser.cc
 | 
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
 | 
| index 3ebab50f3bb808d3fb41efe49bcda673f3435a95..83e795103cdf2618bb3c64126c8358d6c9c4b805 100644
 | 
| --- a/chrome/browser/ui/browser.cc
 | 
| +++ b/chrome/browser/ui/browser.cc
 | 
| @@ -1023,12 +1023,20 @@ void Browser::TabInsertedAt(TabContents* contents,
 | 
|  
 | 
|    registrar_.Add(this, content::NOTIFICATION_INTERSTITIAL_DETACHED,
 | 
|                   content::Source<WebContents>(contents->web_contents()));
 | 
| +  SessionService* session_service =
 | 
| +      SessionServiceFactory::GetForProfile(profile_);
 | 
| +  if (session_service)
 | 
| +    session_service->TabInserted(contents->web_contents());
 | 
|  }
 | 
|  
 | 
|  void Browser::TabClosingAt(TabStripModel* tab_strip_model,
 | 
|                             TabContents* contents,
 | 
|                             int index) {
 | 
|    fullscreen_controller_->OnTabClosing(contents->web_contents());
 | 
| +  SessionService* session_service =
 | 
| +      SessionServiceFactory::GetForProfile(profile_);
 | 
| +  if (session_service)
 | 
| +    session_service->TabClosing(contents->web_contents());
 | 
|    content::NotificationService::current()->Notify(
 | 
|        chrome::NOTIFICATION_TAB_CLOSING,
 | 
|        content::Source<NavigationController>(
 | 
| @@ -1138,6 +1146,10 @@ void Browser::TabReplacedAt(TabStripModel* tab_strip_model,
 | 
|                              TabContents* new_contents,
 | 
|                              int index) {
 | 
|    TabDetachedAtImpl(old_contents, index, DETACH_TYPE_REPLACE);
 | 
| +  SessionService* session_service =
 | 
| +      SessionServiceFactory::GetForProfile(profile_);
 | 
| +  if (session_service)
 | 
| +    session_service->TabClosing(old_contents->web_contents());
 | 
|    TabInsertedAt(new_contents, index, (index == active_index()));
 | 
|  
 | 
|    int entry_count =
 | 
| @@ -1150,8 +1162,6 @@ void Browser::TabReplacedAt(TabStripModel* tab_strip_model,
 | 
|          entry_count - 1);
 | 
|    }
 | 
|  
 | 
| -  SessionService* session_service =
 | 
| -      SessionServiceFactory::GetForProfile(profile());
 | 
|    if (session_service) {
 | 
|      // The new_contents may end up with a different navigation stack. Force
 | 
|      // the session service to update itself.
 | 
| 
 |