summaryrefslogtreecommitdiffstats
path: root/chrome/browser/session_service.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-27 18:09:07 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-27 18:09:07 +0000
commit1e5645ff803bf73889ced446dab5b5f81e6023c0 (patch)
tree560899029aee3d7b933ae5baf1e17f89d90696a1 /chrome/browser/session_service.cc
parent473343c408b846fda90eba9bd7cf96a342f6f286 (diff)
downloadchromium_src-1e5645ff803bf73889ced446dab5b5f81e6023c0.zip
chromium_src-1e5645ff803bf73889ced446dab5b5f81e6023c0.tar.gz
chromium_src-1e5645ff803bf73889ced446dab5b5f81e6023c0.tar.bz2
Cleanup navigation_entry.h. I made the accessors consistent and in Google style, and organized and commented all the entries. Hopefully it will be much easier to find things and deal with this class.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1449 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/session_service.cc')
-rw-r--r--chrome/browser/session_service.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/chrome/browser/session_service.cc b/chrome/browser/session_service.cc
index 39a6034..fe582d1 100644
--- a/chrome/browser/session_service.cc
+++ b/chrome/browser/session_service.cc
@@ -290,7 +290,7 @@ void SessionService::UpdateTabNavigation(const SessionID& window_id,
const SessionID& tab_id,
int index,
const NavigationEntry& entry) {
- if (!entry.GetDisplayURL().is_valid() ||
+ if (!entry.display_url().is_valid() ||
!ShouldTrackChangesToWindow(window_id))
return;
@@ -537,17 +537,16 @@ SessionCommand* SessionService::CreateUpdateTabNavigationCommand(
Pickle pickle;
pickle.WriteInt(tab_id.id());
pickle.WriteInt(index);
- const GURL& url = entry.GetDisplayURL();
- const std::wstring& title = entry.GetTitle();
- const std::string& state = entry.GetContentState();
static const SessionCommand::size_type max_state_size =
std::numeric_limits<SessionCommand::size_type>::max() - 1024;
- if (url.spec().size() + title.size() + state.size() >= max_state_size) {
+ if (entry.display_url().spec().size() +
+ entry.title().size() +
+ entry.content_state().size() >= max_state_size) {
// We only allow navigations up to 63k (which should be completely
// reasonable). On the off chance we get one that is too big, try to
// keep the url.
- if (url.spec().size() < max_state_size) {
- pickle.WriteString(url.spec());
+ if (entry.display_url().spec().size() < max_state_size) {
+ pickle.WriteString(entry.display_url().spec());
pickle.WriteWString(std::wstring());
pickle.WriteString(std::string());
} else {
@@ -556,12 +555,12 @@ SessionCommand* SessionService::CreateUpdateTabNavigationCommand(
pickle.WriteString(std::string());
}
} else {
- pickle.WriteString(url.spec());
- pickle.WriteWString(title);
- pickle.WriteString(state);
+ pickle.WriteString(entry.display_url().spec());
+ pickle.WriteWString(entry.title());
+ pickle.WriteString(entry.content_state());
}
- pickle.WriteInt(entry.GetTransitionType());
- int type_mask = entry.HasPostData() ? TabNavigation::HAS_POST_DATA : 0;
+ pickle.WriteInt(entry.transition_type());
+ int type_mask = entry.has_post_data() ? TabNavigation::HAS_POST_DATA : 0;
pickle.WriteInt(type_mask);
// Adding more data? Be sure and update TabRestoreService too.
return new SessionCommand(kCommandUpdateTabNavigation, pickle);