| Index: chrome/browser/sessions/session_service.cc
|
| diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
|
| index 317c31d26c348afad521ca63b4b68b3baab08841..4eb3f6508d6116ba4cebee74166965db815136c2 100644
|
| --- a/chrome/browser/sessions/session_service.cc
|
| +++ b/chrome/browser/sessions/session_service.cc
|
| @@ -503,9 +503,9 @@ void SessionService::Save() {
|
|
|
| void SessionService::Init() {
|
| // Register for the notifications we're interested in.
|
| - registrar_.Add(this, content::NOTIFICATION_TAB_PARENTED,
|
| + registrar_.Add(this, chrome::NOTIFICATION_TAB_PARENTED,
|
| content::NotificationService::AllSources());
|
| - registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED,
|
| + registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
|
| content::NotificationService::AllSources());
|
| registrar_.Add(this, content::NOTIFICATION_NAV_LIST_PRUNED,
|
| content::NotificationService::AllSources());
|
| @@ -582,7 +582,7 @@ void SessionService::Observe(int type,
|
| break;
|
| }
|
|
|
| - case content::NOTIFICATION_TAB_PARENTED: {
|
| + case chrome::NOTIFICATION_TAB_PARENTED: {
|
| TabContentsWrapper* tab =
|
| content::Source<TabContentsWrapper>(source).ptr();
|
| if (tab->profile() != profile())
|
| @@ -598,17 +598,17 @@ void SessionService::Observe(int type,
|
| break;
|
| }
|
|
|
| - case content::NOTIFICATION_TAB_CLOSED: {
|
| + case content::NOTIFICATION_WEB_CONTENTS_DESTROYED: {
|
| TabContentsWrapper* tab =
|
| TabContentsWrapper::GetCurrentWrapperForContents(
|
| - content::Source<content::NavigationController>(
|
| - source).ptr()->GetWebContents());
|
| + content::Source<content::WebContents>(source).ptr());
|
| if (!tab || tab->profile() != profile())
|
| return;
|
| TabClosed(tab->restore_tab_helper()->window_id(),
|
| tab->restore_tab_helper()->session_id(),
|
| tab->web_contents()->GetClosedByUserGesture());
|
| - RecordSessionUpdateHistogramData(content::NOTIFICATION_TAB_CLOSED,
|
| + RecordSessionUpdateHistogramData(
|
| + content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
|
| &last_updated_tab_closed_time_);
|
| break;
|
| }
|
| @@ -1511,7 +1511,7 @@ void SessionService::RecordSessionUpdateHistogramData(int type,
|
| RecordUpdatedSaveTime(delta, use_long_period);
|
| RecordUpdatedSessionNavigationOrTab(delta, use_long_period);
|
| break;
|
| - case content::NOTIFICATION_TAB_CLOSED:
|
| + case content::NOTIFICATION_WEB_CONTENTS_DESTROYED:
|
| RecordUpdatedTabClosed(delta, use_long_period);
|
| RecordUpdatedSessionNavigationOrTab(delta, use_long_period);
|
| break;
|
|
|