summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions/session_service.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sessions/session_service.cc')
-rw-r--r--chrome/browser/sessions/session_service.cc48
1 files changed, 24 insertions, 24 deletions
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 9dbb0c9..8174434 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -21,10 +21,10 @@
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/prefs/session_startup_pref.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sessions/restore_tab_helper.h"
#include "chrome/browser/sessions/session_backend.h"
#include "chrome/browser/sessions/session_command.h"
#include "chrome/browser/sessions/session_restore.h"
+#include "chrome/browser/sessions/session_tab_helper.h"
#include "chrome/browser/sessions/session_types.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_tabstrip.h"
@@ -447,10 +447,10 @@ void SessionService::UpdateTabNavigation(
}
void SessionService::TabRestored(TabContents* tab, bool pinned) {
- if (!ShouldTrackChangesToWindow(tab->restore_tab_helper()->window_id()))
+ if (!ShouldTrackChangesToWindow(tab->session_tab_helper()->window_id()))
return;
- BuildCommandsForTab(tab->restore_tab_helper()->window_id(), tab, -1,
+ BuildCommandsForTab(tab->session_tab_helper()->window_id(), tab, -1,
pinned, &pending_commands(), NULL);
StartSaveTimer();
}
@@ -607,12 +607,12 @@ void SessionService::Observe(int type,
TabContents* tab = content::Source<TabContents>(source).ptr();
if (tab->profile() != profile())
return;
- SetTabWindow(tab->restore_tab_helper()->window_id(),
- tab->restore_tab_helper()->session_id());
+ SetTabWindow(tab->session_tab_helper()->window_id(),
+ tab->session_tab_helper()->session_id());
if (tab->extension_tab_helper()->extension_app()) {
SetTabExtensionAppID(
- tab->restore_tab_helper()->window_id(),
- tab->restore_tab_helper()->session_id(),
+ tab->session_tab_helper()->window_id(),
+ tab->session_tab_helper()->session_id(),
tab->extension_tab_helper()->extension_app()->id());
}
@@ -626,7 +626,7 @@ void SessionService::Observe(int type,
tab->web_contents()->GetController().
GetDefaultSessionStorageNamespace();
ScheduleCommand(CreateSessionStorageAssociatedCommand(
- tab->restore_tab_helper()->session_id(),
+ tab->session_tab_helper()->session_id(),
session_storage_namespace->persistent_id()));
session_storage_namespace->SetShouldPersist(true);
break;
@@ -642,8 +642,8 @@ void SessionService::Observe(int type,
tab->web_contents()->GetController().
GetDefaultSessionStorageNamespace();
session_storage_namespace->SetShouldPersist(false);
- TabClosed(tab->restore_tab_helper()->window_id(),
- tab->restore_tab_helper()->session_id(),
+ TabClosed(tab->session_tab_helper()->window_id(),
+ tab->session_tab_helper()->session_id(),
tab->web_contents()->GetClosedByUserGesture());
RecordSessionUpdateHistogramData(type, &last_updated_tab_closed_time_);
break;
@@ -658,13 +658,13 @@ void SessionService::Observe(int type,
content::Details<content::PrunedDetails> pruned_details(details);
if (pruned_details->from_front) {
TabNavigationPathPrunedFromFront(
- tab->restore_tab_helper()->window_id(),
- tab->restore_tab_helper()->session_id(),
+ tab->session_tab_helper()->window_id(),
+ tab->session_tab_helper()->session_id(),
pruned_details->count);
} else {
TabNavigationPathPrunedFromBack(
- tab->restore_tab_helper()->window_id(),
- tab->restore_tab_helper()->session_id(),
+ tab->session_tab_helper()->window_id(),
+ tab->session_tab_helper()->session_id(),
tab->web_contents()->GetController().GetEntryCount());
}
RecordSessionUpdateHistogramData(content::NOTIFICATION_NAV_LIST_PRUNED,
@@ -680,8 +680,8 @@ void SessionService::Observe(int type,
return;
content::Details<content::EntryChangedDetails> changed(details);
UpdateTabNavigation(
- tab->restore_tab_helper()->window_id(),
- tab->restore_tab_helper()->session_id(),
+ tab->session_tab_helper()->window_id(),
+ tab->session_tab_helper()->session_id(),
changed->index, *changed->changed_entry);
break;
}
@@ -694,12 +694,12 @@ void SessionService::Observe(int type,
return;
int current_entry_index =
tab->web_contents()->GetController().GetCurrentEntryIndex();
- SetSelectedNavigationIndex(tab->restore_tab_helper()->window_id(),
- tab->restore_tab_helper()->session_id(),
+ SetSelectedNavigationIndex(tab->session_tab_helper()->window_id(),
+ tab->session_tab_helper()->session_id(),
current_entry_index);
UpdateTabNavigation(
- tab->restore_tab_helper()->window_id(),
- tab->restore_tab_helper()->session_id(),
+ tab->session_tab_helper()->window_id(),
+ tab->session_tab_helper()->session_id(),
current_entry_index,
*tab->web_contents()->GetController().GetEntryAtIndex(
current_entry_index));
@@ -719,8 +719,8 @@ void SessionService::Observe(int type,
if (extension_tab_helper->tab_contents()->profile() != profile())
return;
if (extension_tab_helper->extension_app()) {
- RestoreTabHelper* helper =
- extension_tab_helper->tab_contents()->restore_tab_helper();
+ SessionTabHelper* helper =
+ extension_tab_helper->tab_contents()->session_tab_helper();
SetTabExtensionAppID(helper->window_id(),
helper->session_id(),
extension_tab_helper->extension_app()->id());
@@ -1296,7 +1296,7 @@ void SessionService::BuildCommandsForTab(
std::vector<SessionCommand*>* commands,
IdToRange* tab_to_available_range) {
DCHECK(tab && commands && window_id.id());
- const SessionID& session_id(tab->restore_tab_helper()->session_id());
+ const SessionID& session_id(tab->session_tab_helper()->session_id());
commands->push_back(CreateSetTabWindowCommand(window_id, session_id));
const int current_index =
@@ -1354,7 +1354,7 @@ void SessionService::BuildCommandsForTab(
content::SessionStorageNamespace* session_storage_namespace =
tab->web_contents()->GetController().GetDefaultSessionStorageNamespace();
ScheduleCommand(CreateSessionStorageAssociatedCommand(
- tab->restore_tab_helper()->session_id(),
+ tab->session_tab_helper()->session_id(),
session_storage_namespace->persistent_id()));
}